src/klarnapclass.php
public function isValid($now = null)
    {
        if ($this->expire == null
            || $this->expire == '-'
            || $this->expire <= 0
        ) {
            //No expire, or unset? assume valid.
            return true;
        }

        if ($now === null || !is_numeric($now)) {
            $now = time();
        }

        //If now is before expire, it is still valid.
        return ($now > $this->expire) ? false : true;
    }
public function isValid($now = null)
    {
        if ($this->expire == null
            || $this->expire == '-'
            || $this->expire <= 0
        ) {
            //No expire, or unset? assume valid.
            return true;
        }

        if ($now === null || !is_numeric($now)) {
            $now = time();
        }

        //If now is before expire, it is still valid.
        return ($now > $this->expire) ? false : true;
    }
public function isValid ( $ now = null ) { if ( $ this -> expire == null || $ this -> expire == '-' || $ this -> expire <= 0 ) { //No expire, or unset? assume valid. return true ; } if ( $ now === null || ! is_numeric ( $ now ) ) { $ now = time ( ) ; } //If now is before expire, it is still valid. return ( $ now > $ this -> expire ) ? false : true ; }
Checks whether this PClass is valid.

@param int $now Unix timestamp

@return bool
Checks whether this PClass is valid .