public function publishFile($path) {
        $newName = dirname(SCRIPT_FILENAME) . DIRECTORY_SEPARATOR .
                $this->publishFolder . DIRECTORY_SEPARATOR . "files" .
                DIRECTORY_SEPARATOR . md5($path) . '_' . basename($path);
        $url = \mpf\WebApp::get()->request()->getWebRoot() . $this->publishFolder . "/files/" . md5($path) . '_' . basename($path);
        if ($this->_isPublished($newName))
            return $newName;
        $this->_file($path, $newName);
        $this->publishCache[$newName] = true;
        return $url;
    }
public function publishFile($path) {
        $newName = dirname(SCRIPT_FILENAME) . DIRECTORY_SEPARATOR .
                $this->publishFolder . DIRECTORY_SEPARATOR . "files" .
                DIRECTORY_SEPARATOR . md5($path) . '_' . basename($path);
        $url = \mpf\WebApp::get()->request()->getWebRoot() . $this->publishFolder . "/files/" . md5($path) . '_' . basename($path);
        if ($this->_isPublished($newName))
            return $newName;
        $this->_file($path, $newName);
        $this->publishCache[$newName] = true;
        return $url;
    }
public function publishFile ( $ path ) { $ newName = dirname ( SCRIPT_FILENAME ) . DIRECTORY_SEPARATOR . $ this -> publishFolder . DIRECTORY_SEPARATOR . "files" . DIRECTORY_SEPARATOR . md5 ( $ path ) . '_' . basename ( $ path ) ; $ url = \ mpf \ WebApp :: get ( ) -> request ( ) -> getWebRoot ( ) . $ this -> publishFolder . "/files/" . md5 ( $ path ) . '_' . basename ( $ path ) ; if ( $ this -> _isPublished ( $ newName ) ) return $ newName ; $ this -> _file ( $ path , $ newName ) ; $ this -> publishCache [ $ newName ] = true ; return $ url ; }
Publish a single file
@param string $path
@return string Published URL
Publish a single file