PHP Class Scalr\UI\Request\JsonData
Convert input json string to array object
Mostrar archivo
Open project: scalr/scalr
Class Usage Examples
Public Methods
Method |
Description |
|
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 |
|
Method Details
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. |
return |
boolean |
Returns TRUE if needle is found in the array, FALSE otherwise. |
initFromRequest()
public static method
public static initFromRequest ( $value, $name = '' ) : JsonData |
return |
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 |
return |
mixed |
Returns the key for needle if it is found in the array, FALSE otherwise. |