コード例 #1
0
ファイル: Yaml.php プロジェクト: ironedgesoftware/file-utils
 /**
  * Yaml constructor.
  *
  * @param string $path    - Path.
  * @param array  $options - Options.
  *
  * @throws MissingComponentException
  */
 public function __construct($path, array $options)
 {
     if (!class_exists('\\Symfony\\Component\\Yaml\\Yaml')) {
         throw MissingComponentException::create('You need to install component "symfony/yaml" in order to handle YML files.');
     }
     parent::__construct($path, $options);
 }
コード例 #2
0
ファイル: Json.php プロジェクト: ironedgesoftware/file-utils
 /**
  * Returns default options.
  *
  * @return array
  */
 protected function getDefaultOptions()
 {
     return array_replace_recursive(parent::getDefaultOptions(), ['schemaPath' => null, 'encodingOptions' => 448]);
 }