yii\httpclient\Message::hasHeaders PHP Method

hasHeaders() public method

Using this method you are able to check cookie presence without instantiating [[HeaderCollection]].
public hasHeaders ( ) : boolean
return boolean whether message contains any header.
    public function hasHeaders()
    {
        if (is_object($this->_headers)) {
            return $this->_headers->getCount() > 0;
        }
        return !empty($this->_headers);
    }