function DatabaseCondition::__clone

cis7 query.inc DatabaseCondition::__clone()
cle7 query.inc DatabaseCondition::__clone()
elmsmedia7 query.inc DatabaseCondition::__clone()
icor7 query.inc DatabaseCondition::__clone()
meedjum_blog7 query.inc DatabaseCondition::__clone()
mooc7 query.inc DatabaseCondition::__clone()

PHP magic __clone() method.

Only copies fields that implement QueryConditionInterface. Also sets $this->changed to TRUE.

File

includes/database/query.inc, line 1897
Non-specific Database query code. Used by all engines.

Class

DatabaseCondition
Generic class for a series of conditions in a query.

Code

function __clone() {
  $this->changed = TRUE;
  foreach ($this->conditions as $key => $condition) {
    if ($key !== '#conjunction') {
      if ($condition['field'] instanceOf QueryConditionInterface) {
        $this->conditions[$key]['field'] = clone($condition['field']);
      }
      if ($condition['value'] instanceOf SelectQueryInterface) {
        $this->conditions[$key]['value'] = clone($condition['value']);
      }
    }
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.