chore: Аннотации к типам
This commit is contained in:
parent
e2ba6bd46e
commit
e5713e9015
28 changed files with 305 additions and 110 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
/**
|
||||
* http://www.alternateinterior.com/2006/09/a-viewstate-for-php.html
|
||||
* Управление состоянием между страницами
|
||||
*/
|
||||
|
|
@ -8,14 +8,20 @@ namespace ctiso\Form;
|
|||
|
||||
class ViewState // extends Collection
|
||||
{
|
||||
private $values = array();
|
||||
/** @var array */
|
||||
private $values = [];
|
||||
|
||||
function set($name, $value)
|
||||
/**
|
||||
* Устанавливает значение
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
*/
|
||||
function set($name, $value): void
|
||||
{
|
||||
$this->values[$name] = $value;
|
||||
}
|
||||
|
||||
function get($_rest)
|
||||
function get($_rest)
|
||||
{
|
||||
$args = func_get_args();
|
||||
$result = $this->values;
|
||||
|
|
@ -28,7 +34,7 @@ class ViewState // extends Collection
|
|||
return $result;
|
||||
}
|
||||
|
||||
function saveState()
|
||||
function saveState(): string
|
||||
{
|
||||
return base64_encode(serialize($this->values));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue