public function getModel(array $data)
    {
        if (!isset($data['uid'])) {
            throw new \InvalidArgumentException('$data must contain an element "uid".', 1331319491);
        }

        $model = $this->find($data['uid']);

        if ($model->isGhost()) {
            $this->fillModel($model, $data);
        }

        return $model;
    }
public function getModel(array $data)
    {
        if (!isset($data['uid'])) {
            throw new \InvalidArgumentException('$data must contain an element "uid".', 1331319491);
        }

        $model = $this->find($data['uid']);

        if ($model->isGhost()) {
            $this->fillModel($model, $data);
        }

        return $model;
    }
public function getModel ( array $ data ) { if ( ! isset ( $ data [ 'uid' ] ) ) { throw new \ InvalidArgumentException ( '$data must contain an element "uid".' , 1331319491 ) ; } $ model = $ this -> find ( $ data [ 'uid' ] ) ; if ( $ model -> isGhost ( ) ) { $ this -> fillModel ( $ model , $ data ) ; } return $ model ; }
Returns a model for the provided array. If the UID provided with the
array is already mapped, this yet existing model will be returned
irrespective of the other provided data, otherwise the model will be
loaded with the provided data.

@param array $data
data for the model to return, must at least contain an element
with the key "uid"

@return \Tx_Oelib_Model model for the provided UID, filled with the data
provided in case it did not have any data in
memory before
Returns a model for the provided array . If the UID provided with the array is already mapped this yet existing model will be returned irrespective of the other provided data otherwise the model will be loaded with the provided data .