public function set($key, $data = null)
    {
        if (is_array($key)) {
            $this->appendArray($key);
        } else {
            $this->appendData($key, $data);
        }

        return $this;
    }
public function set($key, $data = null)
    {
        if (is_array($key)) {
            $this->appendArray($key);
        } else {
            $this->appendData($key, $data);
        }

        return $this;
    }
public function set ( $ key , $ data = null ) { if ( is_array ( $ key ) ) { $ this -> appendArray ( $ key ) ; } else { $ this -> appendData ( $ key , $ data ) ; } return $ this ; }
set some data in object
can give pair key=>value or array of keys

@param string|array $key
@param mixed $data
@return $this
set some data in object can give pair key = > value or array of keys