示例#1
0
	/**
	 * Populates the model with the data from the form
	 */
	public function populateModel()
	{
		if ($this->_model === null) {
			$this->_model = $this->_builder->createInstance();
		}
		$this->_model->populate($this->getData());
	}
示例#2
0
	/**
	 * Returns the model at the specified index
	 * 
	 * @param	int		$index
	 * @return 	Atomik_Model
	 */
	public function item($index)
	{
		if ($index >= $this->_count) {
			return false;
		}
		
		if (!isset($this->_models[$index])) {
			$this->_models[$index] = $this->_builder->createInstance(
				$this->_data[$index],
				false
			);
		}
		
		return $this->_models[$index];
	}