Phrozn\Site\View\OutputPath\Plain::get PHP Method

get() public method

Get calculated path
public get ( ) : string
return string
    public function get()
    {
        $permalink = $this->getView()->getParam('this.permalink', null);
        if ($permalink === null) {
            return rtrim($this->getView()->getOutputDir(), '/') . '/' . ltrim($this->getRelativeFile('entries', false), '/') . $this->getInputFileExtension();
        }
        $class = 'Phrozn\\Site\\View\\OutputPath\\Entry\\' . ucfirst($permalink);
        if (!class_exists($class)) {
            $class = 'Phrozn\\Site\\View\\OutputPath\\Entry\\Parametrized';
        }
        $object = new $class($this->getView());
        return preg_replace("/\\.html?/", "", $object->get());
    }

Usage Example

Example #1
0
 /**
  * Get output file path
  *
  * @return string
  */
 public function getOutputFile()
 {
     if (!$this->outputFile) {
         $path = new OutputFile($this);
         $this->setOutputFile($path->get());
     }
     return $this->outputFile;
 }
All Usage Examples Of Phrozn\Site\View\OutputPath\Plain::get
Plain