Example #1
0
 /**
  * Returns the arguments as an array.
  * 
  * If a non-array argument is passed, an array will be created using the table's
  * primary column name as the key with the given argument as the (only) value.
  * 
  * @param mixed $args
  * 
  * @return array
  */
 protected function getArrayArgs($args)
 {
     if ($args instanceof RecordInterface) {
         return $args->getModelData();
     }
     if (is_array($args)) {
         return $args;
     }
     return array($this->table->getPrimaryKeyColumn()->name => $args);
 }