<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/10/16
 * Time: 10:53
 */
class Admin
{
    public $uname = "";
    public $pwd = "";

    public function toJson()
    {
        return json_encode($this);
    }

    public function fromJson($json_obj)
    {
        $this->uname = $json_obj['uname'];
        $this->pwd = $json_obj['pwd'];
    }
}