public function pushData(Entity $entity)
    {
        if ($this->isMany()) {
            $this->primaryData[] = $entity;
            return $this;
        }
        $this->primaryData = $entity;
        return $this;
    }
public function pushData(Entity $entity)
    {
        if ($this->isMany()) {
            $this->primaryData[] = $entity;
            return $this;
        }
        $this->primaryData = $entity;
        return $this;
    }
public function pushData ( Entity $ entity ) { if ( $ this -> isMany ( ) ) { $ this -> primaryData [ ] = $ entity ; return $ this ; } $ this -> primaryData = $ entity ; return $ this ; }
Pushes entities to this resource.

@param   Entity    $entity
@return  self
Pushes entities to this resource .