SFAPIclient/Requests/IRI.php
public function is_valid()
    {
        $isauthority = $this->iuserinfo !== null || $this->ihost !== null || $this->port !== null;
        if ($this->ipath !== '' &&
            (
                $isauthority && (
                    $this->ipath[0] !== '/' ||
                    substr($this->ipath, 0, 2) === '//'
                ) ||
                (
                    $this->scheme === null &&
                    !$isauthority &&
                    strpos($this->ipath, ':') !== false &&
                    (strpos($this->ipath, '/') === false ? true : strpos($this->ipath, ':') < strpos($this->ipath, '/'))
                )
            )
        )
        {
            return false;
        }

        return true;
    }
public function is_valid()
    {
        $isauthority = $this->iuserinfo !== null || $this->ihost !== null || $this->port !== null;
        if ($this->ipath !== '' &&
            (
                $isauthority && (
                    $this->ipath[0] !== '/' ||
                    substr($this->ipath, 0, 2) === '//'
                ) ||
                (
                    $this->scheme === null &&
                    !$isauthority &&
                    strpos($this->ipath, ':') !== false &&
                    (strpos($this->ipath, '/') === false ? true : strpos($this->ipath, ':') < strpos($this->ipath, '/'))
                )
            )
        )
        {
            return false;
        }

        return true;
    }
public function is_valid ( ) { $ isauthority = $ this -> iuserinfo !== null || $ this -> ihost !== null || $ this -> port !== null ; if ( $ this -> ipath !== '' && ( $ isauthority && ( $ this -> ipath [ 0 ] !== '/' || substr ( $ this -> ipath , 0 , 2 ) === '//' ) || ( $ this -> scheme === null && ! $ isauthority && strpos ( $ this -> ipath , ':' ) !== false && ( strpos ( $ this -> ipath , '/' ) === false ? true : strpos ( $ this -> ipath , ':' ) < strpos ( $ this -> ipath , '/' ) ) ) ) ) { return false ; } return true ; }
Check if the object represents a valid IRI. This needs to be done on each
call as some things change depending on another part of the IRI.

@return bool
Check if the object represents a valid IRI . This needs to be done on each call as some things change depending on another part of the IRI .