Application::setTicket
Set ticket data and start ticket session
Description
public void Application::setTicket( string $name )
Set ticket data and start ticket session
Arguments
Name | Data type | Default | Remarks |
---|---|---|---|
$name | string | Ticket param key |
Example
Controller
$this->setTicket('foo');
$foo = $this->getSession('ticket_foo');
echo $foo;
Output
670f2f1232f30d4d716c1bc9c8a58388
Once the setTicket
method is called, it will return a hashed random string and will start a new session with your given parameter as key prefixed with ticket_, the returned string will be its value. This will also automatically use the setHidden
method that you can set on form for security evaluation.
Template
{{ hidden }}
Output
<input type='hidden' name='ticket_foo' value='670f2f1232f30d4d716c1bc9c8a58388' />