本文整理汇总了PHP中ActiveRecord::getConnectorContainerName方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecord::getConnectorContainerName方法的具体用法?PHP ActiveRecord::getConnectorContainerName怎么用?PHP ActiveRecord::getConnectorContainerName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActiveRecord
的用法示例。
在下文中一共展示了ActiveRecord::getConnectorContainerName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: asSQLStatement
/**
* @description Build WHERE Statement
*
* @param ActiveRecord $ar
*
* @throws arException
* @return string
*/
public function asSQLStatement(ActiveRecord $ar)
{
if ($this->getType() == self::TYPE_REGULAR) {
$arField = $ar->getArFieldList()->getFieldByName($this->getFieldname());
if ($arField instanceof arField) {
$type = $arField->getFieldType();
$statement = $ar->getConnectorContainerName() . '.' . $this->getFieldname();
} else {
$statement = $this->getFieldname();
}
if (is_array($this->getValue())) {
if (in_array($this->getOperator(), array('IN', 'NOT IN', 'NOTIN'))) {
$statement .= ' ' . $this->getOperator() . ' (';
} else {
$statement .= ' IN (';
}
$values = array();
foreach ($this->getValue() as $value) {
$values[] = $ar->getArConnector()->quote($value, $type);
}
$statement .= implode(', ', $values);
$statement .= ')';
} else {
if ($this->getValue() === NULL) {
$this->setOperator('IS');
}
$statement .= ' ' . $this->getOperator();
$statement .= ' ' . $ar->getArConnector()->quote($this->getValue(), $type);
}
$this->setStatement($statement);
}
return $this->getStatement();
}
示例2: asSQLStatement
/**
* @param ActiveRecord $ar
*
* @return string
*/
public function asSQLStatement(ActiveRecord $ar)
{
$return = ' ' . $this->getType() . ' ';
$return .= ' JOIN ' . $this->getTableName() . ' AS ' . $this->getTableNameAs();
if ($this->getBothExternal()) {
$return .= ' ON ' . $this->getOnFirstField() . ' ' . $this->getOperator() . ' ';
} else {
$return .= ' ON ' . $ar->getConnectorContainerName() . '.' . $this->getOnFirstField() . ' ' . $this->getOperator() . ' ';
}
$return .= $this->getTableNameAs() . '.' . $this->getOnSecondField();
return $return;
}
示例3: delete
/**
* @param ActiveRecord $ar
*/
public function delete(ActiveRecord $ar)
{
$ilDB = $this->returnDB();
$ilDB->manipulate('DELETE FROM ' . $ar->getConnectorContainerName() . ' WHERE ' . arFieldCache::getPrimaryFieldName($ar) . ' = ' . $ilDB->quote($ar->getPrimaryFieldValue(), arFieldCache::getPrimaryFieldType($ar)));
}
示例4: innerjoinAR
/**
* @param ActiveRecord $ar
* @param $on_this
* @param $on_external
* @param array $fields
* @param string $operator
*
* @return $this
*/
public static function innerjoinAR(ActiveRecord $ar, $on_this, $on_external, $fields = array('*'), $operator = '=', $both_external = false)
{
return self::innerjoin($ar->getConnectorContainerName(), $on_this, $on_external, $fields, $operator, $both_external);
}