public function create(array &$data = null) {
		$modelClass = $this->getModelClass();

		$model = $modelClass::factory($data);
		$model->setDatagate($this);

		if ($this->hasLocator()) {
			$model->setLocator($this->getLocator());
		}

		if (empty($data)) {
			$model->forceInsert();
		}

		return $model;
	}
public function create(array &$data = null) {
		$modelClass = $this->getModelClass();

		$model = $modelClass::factory($data);
		$model->setDatagate($this);

		if ($this->hasLocator()) {
			$model->setLocator($this->getLocator());
		}

		if (empty($data)) {
			$model->forceInsert();
		}

		return $model;
	}
public function create ( array & $ data = null ) { $ modelClass = $ this -> getModelClass ( ) ; $ model = $ modelClass :: factory ( $ data ) ; $ model -> setDatagate ( $ this ) ; if ( $ this -> hasLocator ( ) ) { $ model -> setLocator ( $ this -> getLocator ( ) ) ; } if ( empty ( $ data ) ) { $ model -> forceInsert ( ) ; } return $ model ; }
Create a new model, empty or with the supplied data

@param  array $data initial data for the the model
@return \ZExt\Model\Model
Create a new model empty or with the supplied data