<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/10/12
 * Time: 11:23
 */
class VodsInfo
{
    public $id = 0;
    public $appName = "";
    public $dataPath = "";
    public $createdDate = "";
    public $vodType = 0;//0直播录像点播   1自定义的媒体点播路径

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

    public function fromJson($json_obj)
    {
        $this->id = $json_obj['id'];
        $this->appName = $json_obj['appName'];
        $this->dataPath = $json_obj['dataPath'];
        $this->createdDate = $json_obj['createdDate'];
    }
    public static function fromJsonList($json_array)
    {
        $vod_array = array();
        $array_count = count($json_array);
        for($i = 0;$i<$array_count;$i++)
        {
            $vod = new VodsInfo();
            $vod->fromJson($json_array[$i]);
            $vod_array[] = $vod;
        }
        return $vod_array;
    }
}