/** * Appends element parts to the internal list. * @param string|array $elements * @param mixed $extra * @return $this */ public function append($elements, $extra = null) { $conditions = (array) $elements; if (!$this->_where) { $this->_where = new Where(); } foreach ($conditions as $condition) { $logicInner = 'AND'; $value = null; if (is_array($condition)) { $value = isset($condition[1]) ? $condition[1] : null; $logicInner = isset($condition[2]) ? $condition[2] : 'AND'; $condition = $condition[0]; } $this->_where->append(array($condition, $value), $logicInner); } }