public function has($offset = null)
    {
        if ($offset === null) {
            return $this->count() > 0;
        }

        return array_key_exists($offset, $this->storage);
    }
public function has($offset = null)
    {
        if ($offset === null) {
            return $this->count() > 0;
        }

        return array_key_exists($offset, $this->storage);
    }
public function has ( $ offset = null ) { if ( $ offset === null ) { return $ this -> count ( ) > 0 ; } return array_key_exists ( $ offset , $ this -> storage ) ; }
Returns true if bag has cookie with set name

@param string $offset

@return bool
Returns true if bag has cookie with set name