protected function createStorageObject($resourcePathAndFilename, FlowPackageInterface $resourcePackage)
    {
        $pathInfo = UnicodeFunctions::pathinfo($resourcePathAndFilename);

        $object = new StorageObject();
        $object->setFilename($pathInfo['basename']);
        $object->setSha1(sha1_file($resourcePathAndFilename));
        $object->setMd5(md5_file($resourcePathAndFilename));
        $object->setFileSize(filesize($resourcePathAndFilename));
        if (isset($pathInfo['dirname'])) {
            $object->setRelativePublicationPath($this->prepareRelativePublicationPath($pathInfo['dirname'], $resourcePackage->getPackageKey(), $resourcePackage->getResourcesPath()));
        }
        $object->setStream(function () use ($resourcePathAndFilename) {
            return fopen($resourcePathAndFilename, 'r');
        });

        return $object;
    }
protected function createStorageObject($resourcePathAndFilename, FlowPackageInterface $resourcePackage)
    {
        $pathInfo = UnicodeFunctions::pathinfo($resourcePathAndFilename);

        $object = new StorageObject();
        $object->setFilename($pathInfo['basename']);
        $object->setSha1(sha1_file($resourcePathAndFilename));
        $object->setMd5(md5_file($resourcePathAndFilename));
        $object->setFileSize(filesize($resourcePathAndFilename));
        if (isset($pathInfo['dirname'])) {
            $object->setRelativePublicationPath($this->prepareRelativePublicationPath($pathInfo['dirname'], $resourcePackage->getPackageKey(), $resourcePackage->getResourcesPath()));
        }
        $object->setStream(function () use ($resourcePathAndFilename) {
            return fopen($resourcePathAndFilename, 'r');
        });

        return $object;
    }
protected function createStorageObject ( $ resourcePathAndFilename , FlowPackageInterface $ resourcePackage ) { $ pathInfo = UnicodeFunctions :: pathinfo ( $ resourcePathAndFilename ) ; $ object = new StorageObject ( ) ; $ object -> setFilename ( $ pathInfo [ 'basename' ] ) ; $ object -> setSha1 ( sha1_file ( $ resourcePathAndFilename ) ) ; $ object -> setMd5 ( md5_file ( $ resourcePathAndFilename ) ) ; $ object -> setFileSize ( filesize ( $ resourcePathAndFilename ) ) ; if ( isset ( $ pathInfo [ 'dirname' ] ) ) { $ object -> setRelativePublicationPath ( $ this -> prepareRelativePublicationPath ( $ pathInfo [ 'dirname' ] , $ resourcePackage -> getPackageKey ( ) , $ resourcePackage -> getResourcesPath ( ) ) ) ; } $ object -> setStream ( function ( ) use ( $ resourcePathAndFilename ) { return fopen ( $ resourcePathAndFilename , 'r' ) ; } ) ; return $ object ; }
Create a storage object for the given static resource path.

@param string $resourcePathAndFilename
@param FlowPackageInterface $resourcePackage
@return StorageObject
Create a storage object for the given static resource path .