public function buildFromDirectory($dir, $regex = null)
    {
        return $this->invokeEvent(
            self::BUILD_DIR,
            array(
                'dir' => $dir,
                'regex' => $regex
            )
        );
    }
public function buildFromDirectory($dir, $regex = null)
    {
        return $this->invokeEvent(
            self::BUILD_DIR,
            array(
                'dir' => $dir,
                'regex' => $regex
            )
        );
    }
public function buildFromDirectory ( $ dir , $ regex = null ) { return $ this -> invokeEvent ( self :: BUILD_DIR , array ( 'dir' => $ dir , 'regex' => $ regex ) ) ; }
Builds the archive using the files in a directory path.

Triggers the `Builder::BUILD_DIR` event.

$builder->buildFromDirectory('/path/to/example', '/(src|lib)/');

@param string $dir              The directory path.
@param string $regex (optional) The regular expression filter.

@return array An array mapping internal paths to external files.

@api
Builds the archive using the files in a directory path .