本文整理匯總了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);
}