PropertyAccess.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\PropertyAccess;
  11. /**
  12. * Entry point of the PropertyAccess component.
  13. *
  14. * @author Bernhard Schussek <bschussek@gmail.com>
  15. */
  16. final class PropertyAccess
  17. {
  18. /**
  19. * Creates a property accessor with the default configuration.
  20. *
  21. * @return PropertyAccessor The new property accessor
  22. */
  23. public static function createPropertyAccessor()
  24. {
  25. return self::createPropertyAccessorBuilder()->getPropertyAccessor();
  26. }
  27. /**
  28. * Creates a property accessor builder.
  29. *
  30. * @return PropertyAccessorBuilder The new property accessor builder
  31. */
  32. public static function createPropertyAccessorBuilder()
  33. {
  34. return new PropertyAccessorBuilder();
  35. }
  36. /**
  37. * Alias of {@link getPropertyAccessor}.
  38. *
  39. * @return PropertyAccessor The new property accessor
  40. *
  41. * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
  42. * {@link createPropertyAccessor()} instead.
  43. */
  44. public static function getPropertyAccessor()
  45. {
  46. return self::createPropertyAccessor();
  47. }
  48. /**
  49. * This class cannot be instantiated.
  50. */
  51. private function __construct()
  52. {
  53. }
  54. }