public function setData($data)
    {
        $resultData = $this->hydrateIfJsonToArray($data);
        if (!empty($resultData)) {
            $this->data = $resultData;
        }
        else {
            $this->data = [];
        }
    }
public function setData($data)
    {
        $resultData = $this->hydrateIfJsonToArray($data);
        if (!empty($resultData)) {
            $this->data = $resultData;
        }
        else {
            $this->data = [];
        }
    }
public function setData ( $ data ) { $ resultData = $ this -> hydrateIfJsonToArray ( $ data ) ; if ( ! empty ( $ resultData ) ) { $ this -> data = $ resultData ; } else { $ this -> data = [ ] ; } }
Set data to data array

@param string|array  $data  Data that need to be set into extra array

@return void
Set data to data array