ValidationState.php 696 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Application config file resolver
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\App\Arguments;
  9. class ValidationState implements \Magento\Framework\Config\ValidationStateInterface
  10. {
  11. /**
  12. * @var string
  13. */
  14. protected $_appMode;
  15. /**
  16. * @param string $appMode
  17. */
  18. public function __construct($appMode)
  19. {
  20. $this->_appMode = $appMode;
  21. }
  22. /**
  23. * Retrieve current validation state
  24. *
  25. * @return boolean
  26. */
  27. public function isValidationRequired()
  28. {
  29. return $this->_appMode == \Magento\Framework\App\State::MODE_DEVELOPER;
  30. }
  31. }