helpers\BaseJson encode()

encode() public static method Encodes the given value into a JSON string. The method enhances json_encode() by supporting JavaScript expressions. In particular, the method will not encode a JavaScript expression that is represented in terms of a yii\web\JsExpression object. public static string encode ( $value, $options = 320 )$value mixed The data to be encoded. $options integer The encoding options. For more details please refer to http://www.php.net/manual/en/function.json-encode.ph

helpers\BaseJson decode()

decode() public static method Decodes the given JSON string into a PHP data structure. public static mixed decode ( $json, $asArray = true )$json string The JSON string to be decoded $asArray boolean Whether to return objects in terms of associative arrays. return mixed The PHP data throws yii\base\InvalidParamException if there is any decoding error

helpers\BaseJson $jsonErrorMessages

$jsonErrorMessages public static property (available since version 2.0.7) public static array $jsonErrorMessages = ['JSON_ERROR_DEPTH' => 'The maximum stack depth has been exceeded.', 'JSON_ERROR_STATE_MISMATCH' => 'Invalid or malformed JSON.', 'JSON_ERROR_CTRL_CHAR' => 'Control character error, possibly incorrectly encoded.', 'JSON_ERROR_SYNTAX' => 'Syntax error.', 'JSON_ERROR_UTF8' => 'Malformed UTF-8 characters, possibly incorrectly encoded.', 'JSON_ERROR_RECURSION' => '

helpers\BaseInflector variablize()

variablize() public static method Same as camelize but first char is in lowercase. Converts a word like "send_email" to "sendEmail". It will remove non alphanumeric character from the word, so "who's online" will be converted to "whoSOnline" public static string variablize ( $word )$word string To lowerCamelCase

helpers\BaseInflector underscore()

underscore() public static method Converts any "CamelCased" into an "underscored_word". public static string underscore ( $words )$words string The word(s) to underscore

helpers\BaseInflector transliterate()

transliterate() public static method (available since version 2.0.7) Returns transliterated version of a string. If intl extension isn't available uses fallback that converts latin characters only and removes the rest. You may customize characters map via $transliteration property of the helper. public static string transliterate ( $string, $transliterator = null )$string string Input string $transliterator string|\Transliterator Either a \yii\helpers\Transliterator or a string from w

helpers\BaseInflector titleize()

titleize() public static method Converts an underscored or CamelCase word into a English sentence. public static string titleize ( $words, $ucAll = false )$words string $ucAll boolean Whether to set all words to uppercase

helpers\BaseInflector tableize()

tableize() public static method Converts a class name to its table name (pluralized) naming conventions. For example, converts "Person" to "people" public static string tableize ( $className )$className string The class name for getting related table_name

helpers\BaseInflector slug()

slug() public static method Returns a string with all spaces converted to given replacement, non word characters removed and the rest of characters transliterated. If intl extension isn't available uses fallback that converts latin characters only and removes the rest. You may customize characters map via $transliteration property of the helper. public static string slug ( $string, $replacement = '-', $lowercase = true )$string string An arbitrary string to convert $replacement string

helpers\BaseInflector singularize()

singularize() public static method Returns the singular of the $word public static string singularize ( $word )$word string The english word to singularize return string Singular noun.