Example #1
0
 /**
  * Append one or more values to an array.
  *
  * @return mixed
  */
 public function push()
 {
     if ($parameters = func_get_args()) {
         $unique = false;
         if (count($parameters) == 3) {
             list($column, $values, $unique) = $parameters;
         } else {
             list($column, $values) = $parameters;
         }
         // Do batch push by default.
         if (!is_array($values)) {
             $values = array($values);
         }
         $query = $this->setKeysForSaveQuery($this->newQuery());
         $this->pushAttributeValues($column, $values, $unique);
         return $query->push($column, $values, $unique);
     }
     return parent::push();
 }
Example #2
0
 /**
  * Append one or more values to an array.
  *
  * @return mixed
  */
 public function push()
 {
     if ($parameters = func_get_args()) {
         $query = $this->setKeysForSaveQuery($this->newQuery());
         return call_user_func_array(array($query, 'push'), $parameters);
     }
     return parent::push();
 }