* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Resource; /** * ComposerResource tracks the PHP version and Composer dependencies. * * @author Nicolas Grekas */ class ComposerResource implements SelfCheckingResourceInterface, \Serializable { private $vendors; private static $runtimeVendors; public function __construct() { self::refresh(); $this->vendors = self::$runtimeVendors; } public function getVendors() { return array_keys($this->vendors); } /** * {@inheritdoc} */ public function __toString() { return __CLASS__; } /** * {@inheritdoc} */ public function isFresh($timestamp) { self::refresh(); return self::$runtimeVendors === $this->vendors; } public function serialize() { return serialize($this->vendors); } public function unserialize($serialized) { $this->vendors = unserialize($serialized); } private static function refresh() { self::$runtimeVendors = array(); foreach (get_declared_classes() as $class) { if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) { $r = new \ReflectionClass($class); $v = dirname(dirname($r->getFileName())); if (file_exists($v.'/composer/installed.json')) { self::$runtimeVendors[$v] = @filemtime($v.'/composer/installed.json'); } } } } } __halt_compiler();----SIGNATURE:----EQn1ABM5mZwi+KnH5gMGQLSNDZgsBeWj84/MY14tcJaCqkQ0SHHjbvCd+SaVf8PzbrZMzOMpQgKf5fC8HvHLplL+tvSRbaZJmdFNQdDuHU7i1RbPsuieG/Lacb9ILdPhcXr6f0lG4MxGk9f15vjzjIQvp6GZ6rgYGzzGet7Rkd1lXQ+zbazrDdHiP5Ee0Wd918CscRhSlkIEAfxao/krTvIVSjsDHYpumwx7A5pSqwUUdT8Ldg//Cq+MQSkaE680Y6Garna0VWh1VISiw6D3W2bOdaj8iAvdsFXlHoX8i4gxjPcIxa1btdOdk1z37hjE1EOarKFdw38thE5EPHjFYHj4LUrl6agTC7M7Z5+aQ0VfIul2bw+NlKn886t6bgS7/PcaaCfvFdq5Qxp1F+A+6kLcNt18+5X2eFHEjErd6lLTtFsWJoeTMYRo+YNNCHS8W3hE67GIZ4ZGoeGRed5hznCN8mUI/NRTXD1uLcyhNgwMsvUZOl5j+crdzNdEq/c/uU/i5Pa+ZUwjxox9Hl0yUNrSKuHkalJv+Qa096uZtriuMxMwLSaR1gYyL1hrBYWugF3tEwgE21B/NUiWSa6uXuJ19Gb9q2NK77NnF8f/jsnOvt1VVBkJhKOQfIyafZ3WlsrRiw739/GltmU3Zmeu7xivyIoag4/ow/sYHm4lE+k=----ATTACHMENT:----MTU4MTkwNjY1MDYwNDI3MSA4MDI5MzkxNzY5NDIxNTgzIDc5MTA3OTQxMzg1MzEzMzA=