lithium\test\fixtures\adapter\Connection::_create()

protected method

Build fixtures

Parameters

  • mixed $names

    An array of fixture name.

  • boolean $drop

    If true drop the fixture before creating it

  • boolean $save

    If true save fixture's records in the database

Source

	protected function _create($names = [], $drop = true, $save = true) {
		$names = $names ?: array_keys($this->_fixtures);

		foreach ((array) $names as $name) {
			if (isset($this->_loaded[$name]) || $this->_instantiate($name)) {
				$fixture = $this->_loaded[$name];
				if ($save) {
					$fixture->save($drop);
				} else {
					$fixture->create($drop);
				}
			}
		}
	}