From 4f5b44bd3bd490309eb2ba7b44df4769816ba729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Aug 2013 19:26:54 +0200 Subject: twig implementation --- .../PropertyAccess/PropertyAccessorBuilder.php | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php (limited to 'vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php') diff --git a/vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php b/vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php new file mode 100644 index 00000000..25686e95 --- /dev/null +++ b/vendor/symfony/property-access/Symfony/Component/PropertyAccess/PropertyAccessorBuilder.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\PropertyAccess; + +/** + * A configurable builder for PropertyAccessorInterface objects. + * + * @author Jérémie Augustin + */ +class PropertyAccessorBuilder +{ + /** + * @var Boolean + */ + private $magicCall = false; + + /** + * Enables the use of "__call" by the ProperyAccessor. + * + * @return PropertyAccessorBuilder The builder object + */ + public function enableMagicCall() + { + $this->magicCall = true; + + return $this; + } + + /** + * Disables the use of "__call" by the ProperyAccessor. + * + * @return PropertyAccessorBuilder The builder object + */ + public function disableMagicCall() + { + $this->magicCall = false; + + return $this; + } + + /** + * @return Boolean true if the use of "__call" by the ProperyAccessor is enabled + */ + public function isMagicCallEnabled() + { + return $this->magicCall; + } + + /** + * Builds and returns a new propertyAccessor object. + * + * @return PropertyAccessorInterface The built propertyAccessor + */ + public function getPropertyAccessor() + { + return new PropertyAccessor($this->magicCall); + } +} -- cgit v1.2.3