web\CookieCollection fromArray()

fromArray() public method (available since version 2.0.3) Populates the cookie collection from an array. public void fromArray ( array $array )$array array The cookies to populate from

web\CookieCollection getCount()

getCount() public method Returns the number of cookies in the collection. public integer getCount ( )return integer The number of cookies in the collection.

web\CookieCollection count()

count() public method Returns the number of cookies in the collection. This method is required by the SPL Countable interface. It will be implicitly called when you use count($collection). public integer count ( )return integer The number of cookies in the collection.

web\CookieCollection $iterator

$iterator public read-only property An iterator for traversing the cookies in the collection. public ArrayIterator getIterator ( )

web\CookieCollection $count

$count public read-only property The number of cookies in the collection. public integer getCount ( )

web\CookieCollection $readOnly

$readOnly public property Whether this collection is read only. public boolean $readOnly = false

web\CookieCollection add()

add() public method Adds a cookie to the collection. If there is already a cookie with the same name in the collection, it will be removed first. public void add ( $cookie )$cookie yii\web\Cookie The cookie to be added throws yii\base\InvalidCallException if the cookie collection is read only

web\Cookie $secure

$secure public property Whether cookie should be sent via secure connection public boolean $secure = false

web\Cookie __toString()

__toString() public method Magic method to turn a cookie object into a string without having to explicitly access $value. if (isset($request->cookies['name'])) { $value = (string) $request->cookies['name']; } public string __toString ( )return string The value of the cookie. If the value property is null, an empty string will be returned.

web\Cookie $value

$value public property Value of the cookie public string $value = ''