private function getSharedStimulusFile($filePath)
    {
        \helpers_TimeOutHelper::setTimeOutLimit(\helpers_TimeOutHelper::LONG);
        $extractPath = $this->extractArchive($filePath);
        \helpers_TimeOutHelper::reset();

        $iterator = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($extractPath),
            \RecursiveIteratorIterator::LEAVES_ONLY);

        /** @var $file \SplFileInfo */
        foreach ($iterator as $file) {
            //check each file to see if it can be the shared stimulus file
            if ($file->isFile()) {
                if (preg_match('/^[\w]/', $file->getFilename()) === 1 && $file->getExtension() === 'xml') {
                    return $file->getRealPath();
                }
            }
        }

        throw new \common_Exception('XML not found in the package');
    }
private function getSharedStimulusFile($filePath)
    {
        \helpers_TimeOutHelper::setTimeOutLimit(\helpers_TimeOutHelper::LONG);
        $extractPath = $this->extractArchive($filePath);
        \helpers_TimeOutHelper::reset();

        $iterator = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($extractPath),
            \RecursiveIteratorIterator::LEAVES_ONLY);

        /** @var $file \SplFileInfo */
        foreach ($iterator as $file) {
            //check each file to see if it can be the shared stimulus file
            if ($file->isFile()) {
                if (preg_match('/^[\w]/', $file->getFilename()) === 1 && $file->getExtension() === 'xml') {
                    return $file->getRealPath();
                }
            }
        }

        throw new \common_Exception('XML not found in the package');
    }
private function getSharedStimulusFile ( $ filePath ) { \ helpers_TimeOutHelper :: setTimeOutLimit ( \ helpers_TimeOutHelper :: LONG ) ; $ extractPath = $ this -> extractArchive ( $ filePath ) ; \ helpers_TimeOutHelper :: reset ( ) ; $ iterator = new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ extractPath ) , \ RecursiveIteratorIterator :: LEAVES_ONLY ) ; /** @var $file \SplFileInfo */ foreach ( $ iterator as $ file ) { //check each file to see if it can be the shared stimulus file if ( $ file -> isFile ( ) ) { if ( preg_match ( '/^[\w]/' , $ file -> getFilename ( ) ) === 1 && $ file -> getExtension ( ) === 'xml' ) { return $ file -> getRealPath ( ) ; } } } throw new \ common_Exception ( 'XML not found in the package' ) ; }
Get the shared stimulus file with assets from the zip

@param string $filePath path of the zip file
@return string path to the xml
@throws \common_Exception
Get the shared stimulus file with assets from the zip