LazyObjectInterface.php 849 B

1234567891011121314151617181920212223242526272829303132
  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\VarExporter;
  11. interface LazyObjectInterface
  12. {
  13. /**
  14. * Returns whether the object is initialized.
  15. *
  16. * @param $partial Whether partially initialized objects should be considered as initialized
  17. */
  18. public function isLazyObjectInitialized(bool $partial = false): bool;
  19. /**
  20. * Forces initialization of a lazy object and returns it.
  21. */
  22. public function initializeLazyObject(): object;
  23. /**
  24. * @return bool Returns false when the object cannot be reset, ie when it's not a lazy object
  25. */
  26. public function resetLazyObject(): bool;
  27. }