public function addFile($filename)
    {
        if (!is_file($filename)) {
            throw new FileNotFoundException(sprintf("File '%s' not found.", $filename));
        }
        if (pathinfo($filename, PATHINFO_EXTENSION) != 'yml') {
            throw new \InvalidArgumentException(sprintf("Invalid extension for file '%s'.", $filename));
        }

        if (!in_array($filename, $this->files)) {
            $this->files[] = $filename;
        }

        return $this;
    }
public function addFile($filename)
    {
        if (!is_file($filename)) {
            throw new FileNotFoundException(sprintf("File '%s' not found.", $filename));
        }
        if (pathinfo($filename, PATHINFO_EXTENSION) != 'yml') {
            throw new \InvalidArgumentException(sprintf("Invalid extension for file '%s'.", $filename));
        }

        if (!in_array($filename, $this->files)) {
            $this->files[] = $filename;
        }

        return $this;
    }
public function addFile ( $ filename ) { if ( ! is_file ( $ filename ) ) { throw new FileNotFoundException ( sprintf ( "File '%s' not found." , $ filename ) ) ; } if ( pathinfo ( $ filename , PATHINFO_EXTENSION ) != 'yml' ) { throw new \ InvalidArgumentException ( sprintf ( "Invalid extension for file '%s'." , $ filename ) ) ; } if ( ! in_array ( $ filename , $ this -> files ) ) { $ this -> files [ ] = $ filename ; } return $ this ; }
Add yml fixtures file to load

<code>
$loader->addFile('/path/to/fixtures.yml');
</code>

@author Vincent CHALAMON <vincentchalamon@gmail.com>

@param string $filename Yml filename

@return YamlFixturesLoader        Loader
@throws FileNotFoundException     File doesn't exist
@throws \InvalidArgumentException File isn't yml extension
Add yml fixtures file to load