src/PageTitle.php
public function get($direction = 'regular')
    {
        if ($this->count() == 0) {
            return $this->default;
        }

        if ($direction === 'downward') {
            $this->collection = array_reverse($this->collection);
        }

        $this->addPageName();

        if ($direction === 'reverse') {
            $this->collection = array_reverse($this->collection);
        }

        return implode($this->getDelimeter(), $this->collection);
    }
public function get($direction = 'regular')
    {
        if ($this->count() == 0) {
            return $this->default;
        }

        if ($direction === 'downward') {
            $this->collection = array_reverse($this->collection);
        }

        $this->addPageName();

        if ($direction === 'reverse') {
            $this->collection = array_reverse($this->collection);
        }

        return implode($this->getDelimeter(), $this->collection);
    }
public function get ( $ direction = 'regular' ) { if ( $ this -> count ( ) == 0 ) { return $ this -> default ; } if ( $ direction === 'downward' ) { $ this -> collection = array_reverse ( $ this -> collection ) ; } $ this -> addPageName ( ) ; if ( $ direction === 'reverse' ) { $ this -> collection = array_reverse ( $ this -> collection ) ; } return implode ( $ this -> getDelimeter ( ) , $ this -> collection ) ; }
Get the page title.

@param bool|string $direction

@return string
Get the page title .