protected function copyResultFile($handler, $file)
    {
        if (!is_file($file)) {
            throw new \OutOfBoundsException("Result file $file is not readable");
        }

        $extension = 'xml';
        if (preg_match('(\.([a-z]+)$)', $file, $match)) {
            $extension = $match[1];
        }

        copy($file, $this->targetDir . '/' . $handler . '.' . $extension);

        return "$handler.$extension";
    }
protected function copyResultFile($handler, $file)
    {
        if (!is_file($file)) {
            throw new \OutOfBoundsException("Result file $file is not readable");
        }

        $extension = 'xml';
        if (preg_match('(\.([a-z]+)$)', $file, $match)) {
            $extension = $match[1];
        }

        copy($file, $this->targetDir . '/' . $handler . '.' . $extension);

        return "$handler.$extension";
    }
protected function copyResultFile ( $ handler , $ file ) { if ( ! is_file ( $ file ) ) { throw new \ OutOfBoundsException ( "Result file $file is not readable" ) ; } $ extension = 'xml' ; if ( preg_match ( '(\.([a-z]+)$)' , $ file , $ match ) ) { $ extension = $ match [ 1 ] ; } copy ( $ file , $ this -> targetDir . '/' . $ handler . '.' . $ extension ) ; return "$handler.$extension" ; }
Copy result file

@param string $handler
@param string $file

@return string
@throws \OutOfBoundsException
Copy result file