protected function _createModels(array $elements) {
		$modelClass = $this->modelClass;
		$models = [];
		foreach ($elements as $element) {
			$model = $modelClass::instantiate()->setAttributes($this->_getProps($element));
			$models[] = $model->setId(
				$model->getAttribute($modelClass::primaryKey()[0])
			);
		}

		return $models;
	}
protected function _createModels(array $elements) {
		$modelClass = $this->modelClass;
		$models = [];
		foreach ($elements as $element) {
			$model = $modelClass::instantiate()->setAttributes($this->_getProps($element));
			$models[] = $model->setId(
				$model->getAttribute($modelClass::primaryKey()[0])
			);
		}

		return $models;
	}
protected function _createModels ( array $ elements ) { $ modelClass = $ this -> modelClass ; $ models = [ ] ; foreach ( $ elements as $ element ) { $ model = $ modelClass :: instantiate ( ) -> setAttributes ( $ this -> _getProps ( $ element ) ) ; $ models [ ] = $ model -> setId ( $ model -> getAttribute ( $ modelClass :: primaryKey ( ) [ 0 ] ) ) ; } return $ models ; }
Create models from array of elements
@param array $elements
@return array
Create models from array of elements