extends abstract class Phalcon\Di\Injectable
implements Phalcon\Events\EventsAwareInterface, Phalcon\Di\InjectionAwareInterface
Provide OO wrappers to manage a HTTP cookie
public __construct (string $name, [mixed $value], [int $expire], [string $path], [boolean $secure], [string $domain], [boolean $httpOnly])
Phalcon\Http\Cookie constructor
public Phalcon\Http\CookieInterface setValue (string $value)
Sets the cookie’s value
public mixed getValue ([string|array $filters], [string $defaultValue])
Returns the cookie’s value
public Phalcon\Http\Cookie send ()
Sends the cookie to the HTTP client Stores the cookie definition in session
public Phalcon\Http\Cookie 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 Phalcon\Http\Cookie useEncryption (boolean $useEncryption)
Sets if the cookie must be encrypted/decrypted automatically
public boolean isUsingEncryption ()
Check if the cookie is using implicit encryption
public Phalcon\Http\Cookie setExpiration (int $expire)
Sets the cookie’s expiration time
public string getExpiration ()
Returns the current expiration time
public Phalcon\Http\Cookie setPath (string $path)
Sets the cookie’s expiration time
public string getPath ()
Returns the current cookie’s path
public Phalcon\Http\Cookie setDomain (string $domain)
Sets the domain that the cookie is available to
public string getDomain ()
Returns the domain that the cookie is available to
public Phalcon\Http\Cookie setSecure (boolean $secure)
Sets if the cookie must only be sent when the connection is secure (HTTPS)
public boolean getSecure ()
Returns whether the cookie must only be sent when the connection is secure (HTTPS)
public Phalcon\Http\Cookie setHttpOnly (boolean $httpOnly)
Sets if the cookie is accessible only through the HTTP protocol
public boolean getHttpOnly ()
Returns if the cookie is accessible only through the HTTP protocol
public mixed __toString ()
Magic __toString method converts the cookie’s value to string
public setDI (Phalcon\DiInterface $dependencyInjector) inherited from Phalcon\Di\Injectable
Sets the dependency injector
public Phalcon\DiInterface getDI ([unknown $error], [unknown $notUseDefault]) inherited from Phalcon\Di\Injectable
Returns the internal dependency injector
public setEventsManager (Phalcon\Events\ManagerInterface $eventsManager) inherited from Phalcon\Di\Injectable
Sets the event manager
public Phalcon\Events\ManagerInterface getEventsManager () inherited from Phalcon\Di\Injectable
Returns the internal event manager
public boolean fireEvent (string $eventName, [mixed $data], [unknown $cancelable]) inherited from Phalcon\Di\Injectable
Fires an event, implicitly calls behaviors and listeners in the events manager are notified
public mixed fireEventCancel (string $eventName, [mixed $data], [unknown $cancelable]) inherited from Phalcon\Di\Injectable
Fires an event, can stop the event by returning to the false
public boolean hasService (string $name) inherited from Phalcon\Di\Injectable
Check whether the DI contains a service by a name
public Phalcon\Di\ServiceInterface setService (unknown $name) inherited from Phalcon\Di\Injectable
Sets a service from the DI
public object|null getService (unknown $name) inherited from Phalcon\Di\Injectable
Obtains a service from the DI
public mixed getResolveService (string $name, [array $args], [unknown $noerror], [unknown $noshared]) inherited from Phalcon\Di\Injectable
Resolves the service based on its configuration
public attachEvent (string $eventType, Closure $callback) inherited from Phalcon\Di\Injectable
Attach a listener to the events
public __get (unknown $property) inherited from Phalcon\Di\Injectable
Magic method __get
public __sleep () inherited from Phalcon\Di\Injectable
...
public __debugInfo () inherited from Phalcon\Di\Injectable
...