TwistPHP Documentation

set

File path: dist/twist/Core/Utilities/Cookie.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

setSet a cookie. Silently does nothing if headers have already been sent.

Parameters

Name Type Description
$strNamestringn/a
$mxdValuemixedn/a
[$intExpiry = 0]integern/a
[$strPath = ']stringn/a
[$strDomain = false]stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$strName 'foo';
$mxdValue 'foo-123';
$intExpiry 0;
$strPath ';
$strDomain = false;

//Call the function set with the example vars
Twist::Cookie() -> set($strName, $mxdValue, $intExpiry, $strPath, $strDomain);