public function update(AbstractClassContent $content, array $data)
    {
        if (!isset($data['parameters']) && !isset($data['elements'])) {
            throw new \InvalidArgumentException('Provided data are not valids for ClassContentManager::update.');
        }

        if (isset($data['parameters'])) {
            $this->updateParameters($content, $data['parameters']);
        }

        if (isset($data['elements'])) {
            $this->updateElements($content, $data['elements']);
        }

        return $this;
    }
public function update(AbstractClassContent $content, array $data)
    {
        if (!isset($data['parameters']) && !isset($data['elements'])) {
            throw new \InvalidArgumentException('Provided data are not valids for ClassContentManager::update.');
        }

        if (isset($data['parameters'])) {
            $this->updateParameters($content, $data['parameters']);
        }

        if (isset($data['elements'])) {
            $this->updateElements($content, $data['elements']);
        }

        return $this;
    }
public function update ( AbstractClassContent $ content , array $ data ) { if ( ! isset ( $ data [ 'parameters' ] ) && ! isset ( $ data [ 'elements' ] ) ) { throw new \ InvalidArgumentException ( 'Provided data are not valids for ClassContentManager::update.' ) ; } if ( isset ( $ data [ 'parameters' ] ) ) { $ this -> updateParameters ( $ content , $ data [ 'parameters' ] ) ; } if ( isset ( $ data [ 'elements' ] ) ) { $ this -> updateElements ( $ content , $ data [ 'elements' ] ) ; } return $ this ; }
Updates the content whith provided data.

@param  AbstractClassContent $content The content to be updated.
@param  array                $data    Array of data that must contains parameters and/or elements key.

@return ClassContentManager

@throws \InvalidArgumentException     Raises if provided data doesn't have parameters and elements key.
Updates the content whith provided data .