use = $use; } /** * Encode given structure to JSON * * @param mixed $var * @return string * @deprecated 2018-07-27 */ public function encode($var) { dbg_deprecated('json_encode'); return json_encode($var); } /** * Alias for encode() * @param $var * @return string * @deprecated 2018-07-27 */ public function enc($var) { return $this->encode($var); } /** * Decode given string from JSON * * @param string $str * @return mixed * @deprecated 2018-07-27 */ public function decode($str) { dbg_deprecated('json_encode'); return json_decode($str, ($this->use == JSON_LOOSE_TYPE)); } /** * Alias for decode * * @param $str * @return mixed * @deprecated 2018-07-27 */ public function dec($str) { return $this->decode($str); } }