mako\Model


Description


Base model.


Class methods


Toggle source

public __construct($connection = NULL)


Constructor.


Parameters

Type Description
string (optional) Name of the database connection to use (as defined in the config)
Return value

NULL

public function __construct($connection = null)
{
	$this->connection = Database::connection($connection);
}

Toggle source

public static factory($connection = NULL)


Factory method making method chaining possible right off the bat.


Parameters

Type Description
string (optional) Name of the database connection to use (as defined in the config)
Return value

mako\Model

public static function factory($connection = null)
{
	return new static($connection);
}