当前位置: 首页>>代码示例>>PHP>>正文


PHP DatabaseHandler::quoteIdentifier方法代码示例

本文整理汇总了PHP中DatabaseHandler::quoteIdentifier方法的典型用法代码示例。如果您正苦于以下问题:PHP DatabaseHandler::quoteIdentifier方法的具体用法?PHP DatabaseHandler::quoteIdentifier怎么用?PHP DatabaseHandler::quoteIdentifier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DatabaseHandler的用法示例。


在下文中一共展示了DatabaseHandler::quoteIdentifier方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadRolesForContentObjects

 /**
  * Loads all roles associated with the given content objects.
  *
  * @param array $contentIds
  * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT
  *
  * @return array
  */
 public function loadRolesForContentObjects($contentIds, $status = Role::STATUS_DEFINED)
 {
     $query = $this->handler->createSelectQuery();
     $query->select($this->handler->aliasedColumn($query, 'contentobject_id', 'ezuser_role'), $this->handler->aliasedColumn($query, 'id', 'ezrole'), $this->handler->aliasedColumn($query, 'name', 'ezrole'), $this->handler->aliasedColumn($query, 'version', 'ezrole'), $this->handler->aliasedColumn($query, 'id', 'ezpolicy'), $this->handler->aliasedColumn($query, 'function_name', 'ezpolicy'), $this->handler->aliasedColumn($query, 'module_name', 'ezpolicy'), $this->handler->aliasedColumn($query, 'original_id', 'ezpolicy'), $this->handler->aliasedColumn($query, 'identifier', 'ezpolicy_limitation'), $this->handler->aliasedColumn($query, 'value', 'ezpolicy_limitation_value'))->from($query->alias($this->handler->quoteTable('ezuser_role'), $this->handler->quoteIdentifier('ezuser_role_search')))->leftJoin($this->handler->quoteTable('ezrole'), $query->expr->lAnd($query->expr->eq($this->handler->quoteColumn('id', 'ezrole'), $this->handler->quoteColumn('role_id', 'ezuser_role_search')), $query->expr->eq($this->handler->quoteColumn('version', 'ezrole'), $query->bindValue($status, null, \PDO::PARAM_INT))))->leftJoin($this->handler->quoteTable('ezuser_role'), $query->expr->eq($this->handler->quoteColumn('role_id', 'ezuser_role'), $this->handler->quoteColumn('id', 'ezrole')))->leftJoin($this->handler->quoteTable('ezpolicy'), $query->expr->lAnd($query->expr->eq($this->handler->quoteColumn('role_id', 'ezpolicy'), $this->handler->quoteColumn('id', 'ezrole')), $query->expr->eq($this->handler->quoteColumn('original_id', 'ezpolicy'), $query->bindValue($status, null, \PDO::PARAM_INT))))->leftJoin($this->handler->quoteTable('ezpolicy_limitation'), $query->expr->eq($this->handler->quoteColumn('policy_id', 'ezpolicy_limitation'), $this->handler->quoteColumn('id', 'ezpolicy')))->leftJoin($this->handler->quoteTable('ezpolicy_limitation_value'), $query->expr->eq($this->handler->quoteColumn('limitation_id', 'ezpolicy_limitation_value'), $this->handler->quoteColumn('id', 'ezpolicy_limitation')))->where($query->expr->in($this->handler->quoteColumn('contentobject_id', 'ezuser_role_search'), $contentIds));
     $statement = $query->prepare();
     $statement->execute();
     return $statement->fetchAll(\PDO::FETCH_ASSOC);
 }
开发者ID:xcorp1986,项目名称:ezpublish-kernel,代码行数:16,代码来源:DoctrineDatabase.php


注:本文中的DatabaseHandler::quoteIdentifier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。