public function setData($data)
    {
        if (!$data instanceof CollectorInterface) {
            $data = new Collector($data);
        }

        $this->data = $data;

        return $this;
    }
public function setData($data)
    {
        if (!$data instanceof CollectorInterface) {
            $data = new Collector($data);
        }

        $this->data = $data;

        return $this;
    }
public function setData ( $ data ) { if ( ! $ data instanceof CollectorInterface ) { $ data = new Collector ( $ data ) ; } $ this -> data = $ data ; return $ this ; }
Method to set property data

@param   array|CollectorInterface $data

@return  static  Return self to support chaining.
Method to set property data