本文整理汇总了PHP中UserPeer::getTableMap方法的典型用法代码示例。如果您正苦于以下问题:PHP UserPeer::getTableMap方法的具体用法?PHP UserPeer::getTableMap怎么用?PHP UserPeer::getTableMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserPeer
的用法示例。
在下文中一共展示了UserPeer::getTableMap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPhpNameMap
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = UserPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
示例2: filter
public function filter($c, $filters)
{
$filters_key = array_keys($filters);
foreach ($filters_key as $key) {
$value = $filters[$key];
if ($value == '' || $value == null) {
continue;
}
$column = UserPeer::getTableMap()->getColumn($key);
$name = $column->getFullyQualifiedName();
$creoleType = $column->getCreoleType();
if ($creoleType == CreoleTypes::TIMESTAMP) {
$from = $value['from'];
$to = $value['to'];
if ($from != '' && $from != null) {
$c->add($name, $from, Criteria::GREATER_EQUAL);
}
if ($to != '' && $to != null) {
$c->add($name, $to, Criteria::LESS_EQUAL);
}
} else {
if ($creoleType == CreoleTypes::INTEGER) {
$c->add($name, $value);
} else {
if ($creoleType == CreoleTypes::VARCHAR) {
$c->add($name, "%{$value}%", Criteria::LIKE);
}
}
}
}
}
示例3: filterPayment
public function filterPayment($c, $filters)
{
$filters_key = array_keys($filters);
foreach ($filters_key as $key) {
$value = $filters[$key];
if ($value == '' || $value == null) {
continue;
}
if ($key == 'NAME') {
$c->addJoin(VMonthlyPaymentPeer::STUDENT_ID, StudentPeer::ID);
$column = StudentPeer::getTableMap()->getColumn('NAME');
} elseif ($key == 'CODE') {
$c->addJoin(VMonthlyPaymentPeer::STUDENT_ID, StudentPeer::ID);
$column = StudentPeer::getTableMap()->getColumn('CODE');
} elseif ($key == 'USER_NAME') {
$c->addJoin(VMonthlyPaymentPeer::USER_ID, UserPeer::ID);
$column = UserPeer::getTableMap()->getColumn('LOGIN');
} else {
$column = VMonthlyPaymentPeer::getTableMap()->getColumn($key);
}
$name = $column->getFullyQualifiedName();
$creoleType = $column->getCreoleType();
if ($creoleType == CreoleTypes::TIMESTAMP) {
$from = $value['from'];
$to = $value['to'];
$c2 = null;
if ($from != '' && $from != null) {
$c->add($name, $from, Criteria::GREATER_EQUAL);
$c2 = $c->getCriterion($name);
}
if ($from != '' && $from != null && $to != '' && $to != null) {
$c3 = new Criterion($c, $name, $to, Criteria::LESS_EQUAL);
$c2->addAnd($c3);
}
if (($from == '' || $from == null) && $to != '' && $to != null) {
$c->add($name, $to, Criteria::LESS_EQUAL);
}
} else {
if ($creoleType == CreoleTypes::DATE) {
$from = $value['from'];
$to = $value['to'];
$c2 = null;
if ($from != '' && $from != null) {
$c->add($name, $from, Criteria::GREATER_EQUAL);
$c2 = $c->getCriterion($name);
}
if ($from != '' && $from != null && $to != '' && $to != null) {
$c3 = new Criterion($c, $name, $to, Criteria::LESS_EQUAL);
$c2->addAnd($c3);
}
if (($from == '' || $from == null) && $to != '' && $to != null) {
$c->add($name, $to, Criteria::LESS_EQUAL);
}
#$c->add($name, $value, Criteria::LIKE );
} else {
if ($creoleType == CreoleTypes::INTEGER || $creoleType == CreoleTypes::NUMERIC || $creoleType == CreoleTypes::CHAR) {
$c->add($name, $value, Criteria::EQUAL);
} else {
if ($creoleType == CreoleTypes::VARCHAR) {
$c->add($name, "%{$value}%", Criteria::LIKE);
}
}
}
}
}
}