WP_Session::json_in PHP 메소드

json_in() 공개 메소드

Decodes a JSON string and, if the object is an array, overwrites the session container with its contents.
public json_in ( string $data ) : boolean
$data string
리턴 boolean
    public function json_in($data)
    {
        $array = json_decode($data);
        if (is_array($array)) {
            $this->container = $array;
            return true;
        }
        return false;
    }