* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\Config; use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; /** * EnvParametersResource represents resources stored in prefixed environment variables. * * @author Chris Wilkinson * * @deprecated since version 3.4, to be removed in 4.0 */ class EnvParametersResource implements SelfCheckingResourceInterface, \Serializable { /** * @var string */ private $prefix; /** * @var string */ private $variables; /** * @param string $prefix */ public function __construct($prefix) { $this->prefix = $prefix; $this->variables = $this->findVariables(); } /** * {@inheritdoc} */ public function __toString() { return serialize($this->getResource()); } /** * @return array An array with two keys: 'prefix' for the prefix used and 'variables' containing all the variables watched by this resource */ public function getResource() { return array('prefix' => $this->prefix, 'variables' => $this->variables); } /** * {@inheritdoc} */ public function isFresh($timestamp) { return $this->findVariables() === $this->variables; } public function serialize() { return serialize(array('prefix' => $this->prefix, 'variables' => $this->variables)); } public function unserialize($serialized) { if (\PHP_VERSION_ID >= 70000) { $unserialized = unserialize($serialized, array('allowed_classes' => false)); } else { $unserialized = unserialize($serialized); } $this->prefix = $unserialized['prefix']; $this->variables = $unserialized['variables']; } private function findVariables() { $variables = array(); foreach ($_SERVER as $key => $value) { if (0 === strpos($key, $this->prefix)) { $variables[$key] = $value; } } ksort($variables); return $variables; } } __halt_compiler();----SIGNATURE:----LQaZ7+H8qAazUWLxZJXmg3dSntW8n1jGrUsO8Ej0Lo+HoejqaYbGM+9jFJSHon47pPdUE2B4Ygi14aElU3eUhG5yQJ3zCEGJSoDOYw+XH2wkRQlKIU90nPvzY/JoVFYh6/5ebEsWzgi3U0k7Oboh0QQFls8vd8GGCTW4PERn0gyGCcXNWCjckhBUv4CKyHfE+2MJBfQdIyNUQY1dlQ6qaVJf6ArwPMteCEwC0bipRjSxjSM2yuKwbxW7xxQ1yVSkc7r27MJ569btUGOLUsJlb7nYKSSdDmxgb1c7EssUK7Wfb0fbbdfJsO3yl2zoa91wF5XxFixGrGCQeGWXhL3ZJAVZ2327J492bYqwGfZysQyOk6X8JGtN5IcJCPWib0y1AJLyYhu4jceMlzPNM5JYeYiDSk3IQ54fZZyz8hdV+wLsXUkropgD2YWvsYKVFY4wDnv5n4txVTI6hxdlS3EDLva8vxBVjMwPvJ2VyJPkP/973sRxN+B+QnbEs3WM65Id/4YdJKY99dcPfdl4Fg98nbgbCtLOzFzIkE/N/XCIZyqG7+96ObIOj2JKCuiwgpHcvVH4Z+g1J1mGFsEFjM70B8hfBQQsIjDHwKbtBfLR9B6jVkvZNBQzXZnpkPrKDtCKp1tkwluSiYBDtNlqQkes4XTFMqmCynxuLfcmxSPam6g=----ATTACHMENT:----MTAwMjI1MjgyNjU0MTU5OSA5MjQzOTk5MDk5MTAyOTEyIDg0MTM2NjQwOTkxNDk1ODk=