From 3fd785654372d493c031d9b541ab33a881023a32 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 26 Feb 2021 19:16:17 +0300 Subject: * switch to composer for qrcode and otp dependencies * move most OTP-related stuff into userhelper * remove old phpqrcode and otphp libraries --- .../php-settings-container/examples/simple.php | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 vendor/chillerlan/php-settings-container/examples/simple.php (limited to 'vendor/chillerlan/php-settings-container/examples/simple.php') diff --git a/vendor/chillerlan/php-settings-container/examples/simple.php b/vendor/chillerlan/php-settings-container/examples/simple.php new file mode 100644 index 000000000..d8d81095b --- /dev/null +++ b/vendor/chillerlan/php-settings-container/examples/simple.php @@ -0,0 +1,30 @@ + + * @copyright 2018 smiley + * @license MIT + */ + +namespace chillerlan\SettingsExamples; + +use chillerlan\Settings\SettingsContainerAbstract; + +require_once __DIR__.'/../vendor/autoload.php'; + +class MyContainer extends SettingsContainerAbstract{ + protected $foo; + protected $bar; +} + +/** @var \chillerlan\Settings\SettingsContainerInterface $container */ +$container = new MyContainer(['foo' => 'what']); +$container->bar = 'foo'; + +var_dump($container->toJSON()); // -> {"foo":"what","bar":"foo"} + +// non-existing properties will be ignored: +$container->nope = 'what'; + +var_dump($container->nope); // -> NULL -- cgit v1.2.3