public function getSeconds($total = false)
    {
        if ($total === false) {
            return $this->getInterval()->s;
        }

        $sYears = 31536000 * $this->getYears();
        $sMonths = 30 * 24 * 3600 * $this->getMonths();
        $sDays = 24 * 3600 * $this->getDays();
        $sHours = 3600 * $this->getHours();
        $sMinutes = 60 * $this->getMinutes();
        $sSeconds = $this->getSeconds();

        return $sYears + $sMonths + $sDays + $sHours + $sMinutes + $sSeconds;
    }
public function getSeconds($total = false)
    {
        if ($total === false) {
            return $this->getInterval()->s;
        }

        $sYears = 31536000 * $this->getYears();
        $sMonths = 30 * 24 * 3600 * $this->getMonths();
        $sDays = 24 * 3600 * $this->getDays();
        $sHours = 3600 * $this->getHours();
        $sMinutes = 60 * $this->getMinutes();
        $sSeconds = $this->getSeconds();

        return $sYears + $sMonths + $sDays + $sHours + $sMinutes + $sSeconds;
    }
public function getSeconds ( $ total = false ) { if ( $ total === false ) { return $ this -> getInterval ( ) -> s ; } $ sYears = 31536000 * $ this -> getYears ( ) ; $ sMonths = 30 * 24 * 3600 * $ this -> getMonths ( ) ; $ sDays = 24 * 3600 * $ this -> getDays ( ) ; $ sHours = 3600 * $ this -> getHours ( ) ; $ sMinutes = 60 * $ this -> getMinutes ( ) ; $ sSeconds = $ this -> getSeconds ( ) ; return $ sYears + $ sMonths + $ sDays + $ sHours + $ sMinutes + $ sSeconds ; }
Get the number of seconds.

@param int $total Whether to get the total amount of seconds, as a single integer, that represents the complete duration.
@return int The value of the total duration in seconds.
Get the number of seconds .