Пример #1
0
 /**
  * Loads in the given file and parses it.
  *
  * @param string $file File to load
  *
  * @return string|array|stdClass The parsed file data
  *
  * @since              0.2.4
  * @codeCoverageIgnore
  */
 protected function loadFile($file = null)
 {
     $this->file = $file;
     $contents = $this->parseVars(Utils::getContent($file));
     if (extension_loaded('yaml')) {
         return yaml_parse($contents);
     }
     return YamlParser::parse($contents);
 }
Пример #2
0
 /**
  * Loads in the given file and parses it.
  *
  * @param string|bool|null $file File to load
  *
  * @return array The parsed file data
  *
  * @since              0.2.4
  * @codeCoverageIgnore
  */
 protected function loadFile($file = null)
 {
     $this->file = is_file($file) ? $file : false;
     $contents = $this->parseVars(Utils::getContent($this->file));
     if ($this->file && !is_null($file)) {
         $this->parsedFile = $this->parseProperties($contents);
     }
 }
Пример #3
0
 /**
  * Loads in the given file and parses it.
  *
  * @param string $file File to load
  *
  * @return array The parsed file data
  *
  * @since              0.2.4
  * @codeCoverageIgnore
  */
 protected function loadFile($file = null)
 {
     $this->file = $file;
     $contents = $this->parseVars(Utils::getContent($file));
     return NeonParser::decode($contents);
 }
Пример #4
0
 /**
  * Loads in the given file and parses it.
  *
  * @param string $file File to load
  *
  * @return array The parsed file data
  *
  * @since              0.2.4
  * @codeCoverageIgnore
  */
 protected function loadFile($file = null)
 {
     $this->file = $file;
     $contents = $this->parseVars(Utils::getContent($file));
     return json_decode($contents, true);
 }
Пример #5
0
 /**
  * Loads in the given file and parses it.
  *
  * @param string $file File to load
  *
  * @return array|SimpleXMLElement The parsed file data
  *
  * @since              0.2.4
  * @codeCoverageIgnore
  */
 protected function loadFile($file = null)
 {
     $this->file = $file;
     $contents = $this->parseVars(Utils::getContent($file));
     return simplexml_load_string($contents, 'SimpleXMLElement', LIBXML_NOWARNING | LIBXML_NOERROR);
 }
Пример #6
0
 /**
  * Loads in the given file and parses it.
  *
  * @param string $file File to load
  *
  * @return array The parsed file data
  *
  * @since              0.2.4
  * @codeCoverageIgnore
  */
 protected function loadFile($file = null)
 {
     $this->file = $file;
     $contents = $this->parseVars(Utils::getContent($file));
     return TomlLib::Parse($contents);
 }
Пример #7
0
 /**
  * Loads in the given file and parses it.
  *
  * @param string $file File to load
  *
  * @return array The parsed file data
  *
  * @since              0.2.4
  * @codeCoverageIgnore
  */
 protected function loadFile($file = null)
 {
     $this->file = $file;
     $contents = $this->parseVars(Utils::getContent($file));
     return @parse_ini_string($contents, true);
 }