本文整理汇总了PHP中Nette\Database\Table\Selection::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Selection::__construct方法的具体用法?PHP Selection::__construct怎么用?PHP Selection::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nette\Database\Table\Selection
的用法示例。
在下文中一共展示了Selection::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, Selection $refTable, $column)
{
parent::__construct($name, $refTable->connection);
$this->refTable = $refTable;
$this->column = $column;
$this->delimitedColumn = $this->connection->getSupplementalDriver()->delimite($this->column);
}
示例2: __construct
/**
* @param string
* @param IModelManager
*/
public function __construct($table, IModelManager $manager)
{
if (NETTE_VERSION_ID >= 20100) {
parent::__construct($manager->getConnection(), $table, $manager->getDatabaseReflection(), $manager->getCacheStorage());
} else {
parent::__construct($table, $manager->getConnection());
}
$this->manager = $manager;
}
示例3: __construct
public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection)
{
parent::__construct($connection, 'event_time', $reflection);
$this->select('event_time.*');
$this->select('DATEDIFF(event_time.date_from, CURDATE()) AS diff_date_from');
$this->select('DATEDIFF(event_time.date_to, CURDATE()) AS diff_date_to');
$this->select('DATEDIFF(event_time.date_to, event_time.date_from) AS diff_dates');
$this->context = $context;
}
示例4: __construct
public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection, \Nette\Caching\Cache $cache)
{
parent::__construct($connection, 'event_time_all', $reflection);
$this->context = $context;
$this->cache = $cache;
$this->select('event_time_all.*');
$this->select('DATEDIFF(event_time.date_from, CURDATE()) AS diff_date_from');
$this->select('DATEDIFF(event_time.date_to, CURDATE()) AS diff_date_to');
$this->select('DATEDIFF(event_time.date_to, event_time.date_from) AS diff_dates');
$this->select('event_time.event.visible');
$this->select('event_time.event.approved');
$this->select('event_time.event_id');
}
示例5: __construct
public function __construct(\Nette\Database\Context $database)
{
parent::__construct($database, $database->getConventions(), $this->table);
$this->db = $database;
}
示例6: __construct
public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection)
{
parent::__construct($connection, 'page', $reflection);
$this->context = $context;
}
示例7: __construct
/**
* Creates filtered and grouped table representation.
* @param Selection $refTable
* @param string database table name
* @param string joining column
*/
public function __construct(Selection $refTable, $table, $column)
{
parent::__construct($table, $refTable->connection);
$this->refTable = $refTable;
$this->column = $column;
}
示例8: __construct
/**
* Creates filtered and grouped table representation.
* @param Context
* @param IConventions
* @param string database table name
* @param string joining column
* @param Selection
* @param Nette\Caching\IStorage|NULL
*/
public function __construct(Context $context, IConventions $conventions, $tableName, $column, Selection $refTable, Nette\Caching\IStorage $cacheStorage = NULL)
{
$this->refTable = $refTable;
$this->column = $column;
parent::__construct($context, $conventions, $tableName, $cacheStorage);
}
示例9: __construct
public function __construct($name, Selection $refTable, $column)
{
parent::__construct($name, $refTable->connection);
$this->refTable = $refTable;
$this->through($column);
}
示例10: __construct
public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection)
{
parent::__construct($connection, 'shire', $reflection);
}
示例11: __construct
/**
* Creates filtered and grouped table representation.
* @param Selection $refTable
* @param string database table name
* @param string joining column
*/
public function __construct(Selection $refTable, $table, $column)
{
$this->refTable = $refTable;
$this->column = $column;
parent::__construct($refTable->connection, $table, $refTable->reflection, $refTable->cache ? $refTable->cache->getStorage() : NULL);
}
示例12:
Selection{protected$refTable;protected$column;protected$delimitedColumn;protected$active;protected$referencing;protected$aggregation=array();function
__construct($name,Selection$refTable,$column){parent::__construct($name,$refTable->connection);$this->refTable=$refTable;$this->column=$column;$this->delimitedColumn=$this->connection->getSupplementalDriver()->delimite($this->column);}function
示例13: __construct
public function __construct(Connection $connection, \Nette\DI\Container $context, \Nette\Database\IReflection $reflection, Nette\Caching\IStorage $cacheStorage)
{
parent::__construct($connection, 'event', $reflection, $cacheStorage);
$this->context = $context;
}
示例14: __construct
public function __construct($table, Nette\Database\Context $context)
{
parent::__construct($context->getConnection(), $table, $context->getDatabaseReflection());
}