src/monitor/FileDependency.php
public static function create($fileNames) {
        if (!is_array($fileNames)) {
            if (!is_string($fileNames)) throw new IllegalTypeException('Illegal type of parameter $fileNames: '.gettype($fileNames));
            if (!strlen($fileNames))    throw new InvalidArgumentException('Invalid argument $fileNames: '.$fileNames);
            $fileNames = [$fileNames];
        }
        if (!$fileNames) throw new InvalidArgumentException('Invalid argument $fileNames: '.$fileNames);

        $dependency = null;

        foreach ($fileNames as $name) {
            if (!$dependency) $dependency = new static($name);
            else              $dependency = $dependency->andDependency(new static($name));
        }

        return $dependency;
    }
public static function create($fileNames) {
        if (!is_array($fileNames)) {
            if (!is_string($fileNames)) throw new IllegalTypeException('Illegal type of parameter $fileNames: '.gettype($fileNames));
            if (!strlen($fileNames))    throw new InvalidArgumentException('Invalid argument $fileNames: '.$fileNames);
            $fileNames = [$fileNames];
        }
        if (!$fileNames) throw new InvalidArgumentException('Invalid argument $fileNames: '.$fileNames);

        $dependency = null;

        foreach ($fileNames as $name) {
            if (!$dependency) $dependency = new static($name);
            else              $dependency = $dependency->andDependency(new static($name));
        }

        return $dependency;
    }
public static function create ( $ fileNames ) { if ( ! is_array ( $ fileNames ) ) { if ( ! is_string ( $ fileNames ) ) throw new IllegalTypeException ( 'Illegal type of parameter $fileNames: ' . gettype ( $ fileNames ) ) ; if ( ! strlen ( $ fileNames ) ) throw new InvalidArgumentException ( 'Invalid argument $fileNames: ' . $ fileNames ) ; $ fileNames = [ $ fileNames ] ; } if ( ! $ fileNames ) throw new InvalidArgumentException ( 'Invalid argument $fileNames: ' . $ fileNames ) ; $ dependency = null ; foreach ( $ fileNames as $ name ) { if ( ! $ dependency ) $ dependency = new static ( $ name ) ; else $ dependency = $ dependency -> andDependency ( new static ( $ name ) ) ; } return $ dependency ; }
Erzeugt eine neue FileDependency, die eine oder mehrere Dateien ueberwacht.

@param  mixed $fileNames - einzelner Dateiname (String) oder Array von Dateinamen

@return Dependency
Erzeugt eine neue FileDependency die eine oder mehrere Dateien ueberwacht .