public function addFile($path)
    {
        $paths = $this->getGlobbedPaths($path);
        foreach ($paths as $path) {
            $file = new File($path);
            $path = $file->getRealPath()
                ? $file->getRealPath()
                : $file->getPathname();

            $this[$path] = $file;
        }
    }
public function addFile($path)
    {
        $paths = $this->getGlobbedPaths($path);
        foreach ($paths as $path) {
            $file = new File($path);
            $path = $file->getRealPath()
                ? $file->getRealPath()
                : $file->getPathname();

            $this[$path] = $file;
        }
    }
public function addFile ( $ path ) { $ paths = $ this -> getGlobbedPaths ( $ path ) ; foreach ( $ paths as $ path ) { $ file = new File ( $ path ) ; $ path = $ file -> getRealPath ( ) ? $ file -> getRealPath ( ) : $ file -> getPathname ( ) ; $ this [ $ path ] = $ file ; } }
Adds a file to the collection.

@param string $path File location, may be absolute, relative or even phar.

@return void
Adds a file to the collection .