本文整理匯總了PHP中Zend\Db\TableGateway\TableGateway::getColumns方法的典型用法代碼示例。如果您正苦於以下問題:PHP TableGateway::getColumns方法的具體用法?PHP TableGateway::getColumns怎麽用?PHP TableGateway::getColumns使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend\Db\TableGateway\TableGateway
的用法示例。
在下文中一共展示了TableGateway::getColumns方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ListaIn
/**
* @desc Metoda zwraca liste rekordów z kolumna id i nazwa dla tabeli podanej w parametrze. Jeżeli jest pole status to zwraca tylko te z status=1
* @param $sTabelaSlownikowa
* @param $aIds array
* @param $intBaza nazwa bazy do ktorej ma się odnosic lista
* @return array
*/
public static function ListaIn($nazwaSlownika, $aIds = array(), $aCols = array())
{
$projectTable = new TableGateway($nazwaSlownika, \Zend\Db\TableGateway\Feature\GlobalAdapterFeature::getStaticAdapter());
$projectTable->getColumns();
$select = new \Zend\Db\Sql\Select();
if (!empty($aCols)) {
$select->columns($aCols);
}
$select->from($nazwaSlownika);
$select->in(implode(',', $aIds));
$rowset = $projectTable->selectWith($select);
if ($rowset) {
return $rowset;
}
return array();
}
示例2: TableGateway
<?php
/** @var $adapter Zend\Db\Adapter\Adapter */
$adapter = (include file_exists('bootstrap.php') ? 'bootstrap.php' : 'bootstrap.dist.php');
refresh_data($adapter);
use Zend\Db\TableGateway\TableGateway, Zend\Db\TableGateway\Feature\FeatureSet, Zend\Db\TableGateway\Feature\MetadataFeature;
$artistTable = new TableGateway('artist', $adapter, new MetadataFeature());
var_dump($artistTable->getColumns());
示例3: getColumns
private function getColumns()
{
return $this->tableGateway->getColumns();
}