PHP Класс Scalr\UI\Request\JsonData
Convert input json string to array object
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Метод |
Описание |
|
has ( mixed $needle, boolean $strict = false ) : boolean |
Checks if a value exists in an array |
|
initFromRequest ( $value, $name = '' ) : JsonData |
|
|
search ( mixed $needle, boolean $strict = false ) : mixed |
Searches the array for a given value and returns the corresponding key if successful |
|
Описание методов
Checks if a value exists in an array
public has ( mixed $needle, boolean $strict = false ) : boolean |
$needle |
mixed |
A value |
$strict |
boolean |
optional If it is set to TRUE then function will also
check the types of the needle in the haystack. |
Результат |
boolean |
Returns TRUE if needle is found in the array, FALSE otherwise. |
initFromRequest()
публичный статический Метод
public static initFromRequest ( $value, $name = '' ) : JsonData |
Результат |
JsonData |
|
Searches the array for a given value and returns the corresponding key if successful
public search ( mixed $needle, boolean $strict = false ) : mixed |
$needle |
mixed |
The searched value |
$strict |
boolean |
optional Will searchf for identical elements |
Результат |
mixed |
Returns the key for needle if it is found in the array, FALSE otherwise. |