public function setCACertificates($path, $type)
    {
        if (!in_array($type, array('capath', 'cainfo'))) {
            throw new \OtherCode\Rest\Exceptions\RestException('Invalid param "type" in for ' . __METHOD__ . 'method.');
        }

        $this->ssl_verifypeer = true;
        $this->ssl_verifyhost = 2;
        $this->$type = $path;
        return $this;
    }
public function setCACertificates($path, $type)
    {
        if (!in_array($type, array('capath', 'cainfo'))) {
            throw new \OtherCode\Rest\Exceptions\RestException('Invalid param "type" in for ' . __METHOD__ . 'method.');
        }

        $this->ssl_verifypeer = true;
        $this->ssl_verifyhost = 2;
        $this->$type = $path;
        return $this;
    }
public function setCACertificates ( $ path , $ type ) { if ( ! in_array ( $ type , array ( 'capath' , 'cainfo' ) ) ) { throw new \ OtherCode \ Rest \ Exceptions \ RestException ( 'Invalid param "type" in for ' . __METHOD__ . 'method.' ) ; } $ this -> ssl_verifypeer = true ; $ this -> ssl_verifyhost = 2 ; $ this -> $ type = $ path ; return $ this ; }
Set a CA Certificate to validate peers
@param string $path
@param string $type Can be capath or cainfo
@throws \OtherCode\Rest\Exceptions\RestException
@return $this
Set a CA Certificate to validate peers