public function importAuxiliaryFiles(QtiResource $qtiItemResource)
    {
        $qtiFile = $this->getSource() . \helpers_File::urlToPath($qtiItemResource->getFile());
        foreach ($qtiItemResource->getAuxiliaryFiles() as $auxiliaryFile) {
            $absolutePath = $this->getAbsolutePath($auxiliaryFile);
            $relativePath = $this->getRelativePath($qtiFile, $absolutePath);

            if (!\helpers_File::isFileInsideDirectory($relativePath, dirname($qtiFile))) {
                throw new InvalidSourcePathException(dirname($qtiFile), $auxiliaryFile);
            }

            try {
                $this->importAsset($absolutePath, $relativePath);
            } catch(\common_Exception $e) {
                throw new AssetManagerException(
                    'Error occurs during auxiliary assets handling for item: ' . $qtiItemResource->getIdentifier()
                    . ', assetFile: ' . $relativePath,
                    0, $e
                );
            }
        }
        return $this;
    }
public function importAuxiliaryFiles(QtiResource $qtiItemResource)
    {
        $qtiFile = $this->getSource() . \helpers_File::urlToPath($qtiItemResource->getFile());
        foreach ($qtiItemResource->getAuxiliaryFiles() as $auxiliaryFile) {
            $absolutePath = $this->getAbsolutePath($auxiliaryFile);
            $relativePath = $this->getRelativePath($qtiFile, $absolutePath);

            if (!\helpers_File::isFileInsideDirectory($relativePath, dirname($qtiFile))) {
                throw new InvalidSourcePathException(dirname($qtiFile), $auxiliaryFile);
            }

            try {
                $this->importAsset($absolutePath, $relativePath);
            } catch(\common_Exception $e) {
                throw new AssetManagerException(
                    'Error occurs during auxiliary assets handling for item: ' . $qtiItemResource->getIdentifier()
                    . ', assetFile: ' . $relativePath,
                    0, $e
                );
            }
        }
        return $this;
    }
public function importAuxiliaryFiles ( QtiResource $ qtiItemResource ) { $ qtiFile = $ this -> getSource ( ) . \ helpers_File :: urlToPath ( $ qtiItemResource -> getFile ( ) ) ; foreach ( $ qtiItemResource -> getAuxiliaryFiles ( ) as $ auxiliaryFile ) { $ absolutePath = $ this -> getAbsolutePath ( $ auxiliaryFile ) ; $ relativePath = $ this -> getRelativePath ( $ qtiFile , $ absolutePath ) ; if ( ! \ helpers_File :: isFileInsideDirectory ( $ relativePath , dirname ( $ qtiFile ) ) ) { throw new InvalidSourcePathException ( dirname ( $ qtiFile ) , $ auxiliaryFile ) ; } try { $ this -> importAsset ( $ absolutePath , $ relativePath ) ; } catch ( \ common_Exception $ e ) { throw new AssetManagerException ( 'Error occurs during auxiliary assets handling for item: ' . $ qtiItemResource -> getIdentifier ( ) . ', assetFile: ' . $ relativePath , 0 , $ e ) ; } } return $ this ; }
Import auxiliaryFile e.q. css, js...

@param QtiResource $qtiItemResource
@return $this
@throws AssetManagerException
@throws InvalidSourcePathException
Import auxiliaryFile e . q . css js ...