public function getArchiveYear()
    {
        if ($this->request->param('Year')) {
            if (preg_match('/^[0-9]{4}$/', $year = $this->request->param('Year'))) {
                return (int) $year;
            }
        } elseif ($this->request->param('Action') == 'archive') {
            return DBDatetime::now()->Year();
        }

        return null;
    }
public function getArchiveYear()
    {
        if ($this->request->param('Year')) {
            if (preg_match('/^[0-9]{4}$/', $year = $this->request->param('Year'))) {
                return (int) $year;
            }
        } elseif ($this->request->param('Action') == 'archive') {
            return DBDatetime::now()->Year();
        }

        return null;
    }
public function getArchiveYear ( ) { if ( $ this -> request -> param ( 'Year' ) ) { if ( preg_match ( '/^[0-9]{4}$/' , $ year = $ this -> request -> param ( 'Year' ) ) ) { return ( int ) $ year ; } } elseif ( $ this -> request -> param ( 'Action' ) == 'archive' ) { return DBDatetime :: now ( ) -> Year ( ) ; } return null ; }
Fetches the archive year from the url.

@return int
Fetches the archive year from the url .