企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# Class Phalcon\\Http\\Cookie # Class **Phalcon\\Http\\Cookie** *implements*`Phalcon\Di\InjectionAwareInterface` Provide OO wrappers to manage a HTTP cookie ### Methods public **\_\_construct** (*string* $name, \[*mixed* $value\], \[*int* $expire\], \[*string* $path\], \[*boolean* $secure\], \[*string* $domain\], \[*boolean* $httpOnly\]) Phalcon\\Http\\Cookie constructor public **setDI** (*unknown* $dependencyInjector) Sets the dependency injector public **getDI** () Returns the internal dependency injector public <a class="calibre6 pcalibre1" href="">*Phalcon\\Http\\Cookie*</a>**setValue** (*string* $value) Sets the cookie's value public *mixed***getValue** (\[*string|array* $filters\], \[*string* $defaultValue\]) Returns the cookie's value public **send** () Sends the cookie to the HTTP client Stores the cookie definition in session public **restore** () Reads the cookie-related info from the SESSION to restore the cookie as it was set This method is automatically called internally so normally you don't need to call it public **delete** () Deletes the cookie by setting an expire time in the past public **useEncryption** (*unknown* $useEncryption) Sets if the cookie must be encrypted/decrypted automatically public **isUsingEncryption** () Check if the cookie is using implicit encryption public **setExpiration** (*unknown* $expire) Sets the cookie's expiration time public **getExpiration** () Returns the current expiration time public **setPath** (*unknown* $path) Sets the cookie's expiration time public **getName** () Returns the current cookie's name public **getPath** () Returns the current cookie's path public **setDomain** (*unknown* $domain) Sets the domain that the cookie is available to public **getDomain** () Returns the domain that the cookie is available to public **setSecure** (*unknown* $secure) Sets if the cookie must only be sent when the connection is secure (HTTPS) public **getSecure** () Returns whether the cookie must only be sent when the connection is secure (HTTPS) public **setHttpOnly** (*unknown* $httpOnly) Sets if the cookie is accessible only through the HTTP protocol public **getHttpOnly** () Returns if the cookie is accessible only through the HTTP protocol public **\_\_toString** () Magic \_\_toString method converts the cookie's value to string | - [索引](# "总目录") - [下一页](# "Class Phalcon\Http\Cookie\Exception") | - [上一页](# "Class Phalcon\Forms\Manager") | - [API Indice](#) »