FeaturePhp/Specification/DirectorySpecification.php
public static function fromArrayAndSettings($cfg, $settings) {
        $directorySpecification = new self($cfg, $settings->getDirectory());
        $directorySpecification->set("source", $settings->getPath($directorySpecification->getSource()));
        $directorySpecification->set("baseTarget", $settings->getOptional("target", null));

        if (!is_dir($directorySpecification->getSource()))
            throw new DirectorySpecificationException("directory \"{$directorySpecification->getSource()}\" does not exist");

        return $directorySpecification;
    }
public static function fromArrayAndSettings($cfg, $settings) {
        $directorySpecification = new self($cfg, $settings->getDirectory());
        $directorySpecification->set("source", $settings->getPath($directorySpecification->getSource()));
        $directorySpecification->set("baseTarget", $settings->getOptional("target", null));

        if (!is_dir($directorySpecification->getSource()))
            throw new DirectorySpecificationException("directory \"{$directorySpecification->getSource()}\" does not exist");

        return $directorySpecification;
    }
public static function fromArrayAndSettings ( $ cfg , $ settings ) { $ directorySpecification = new self ( $ cfg , $ settings -> getDirectory ( ) ) ; $ directorySpecification -> set ( "source" , $ settings -> getPath ( $ directorySpecification -> getSource ( ) ) ) ; $ directorySpecification -> set ( "baseTarget" , $ settings -> getOptional ( "target" , null ) ) ; if ( ! is_dir ( $ directorySpecification -> getSource ( ) ) ) throw new DirectorySpecificationException ( "directory \"{$directorySpecification->getSource()}\" does not exist" ) ; return $ directorySpecification ; }
Creates a directory specification from a plain settings array.
The settings context is taken into consideration to generate paths
relative to the settings.
@param array $cfg a plain settings array
@param \FeaturePhp\Settings $settings the settings context
@return DirectorySpecification
Creates a directory specification from a plain settings array . The settings context is taken into consideration to generate paths relative to the settings .