diff --git a/db/cursor.php b/db/cursor.php index f007daaa..6edbc0e0 100644 --- a/db/cursor.php +++ b/db/cursor.php @@ -96,11 +96,11 @@ abstract function update(); abstract function copyfrom($var,$func=NULL); /** - * Populate array variable with mapper fields + * Populate hive array variable with mapper fields * @return NULL - * @param $var mixed + * @param $key string **/ - abstract function copyto(&$var); + abstract function copyto($key); /** * Get cursor's equivalent external iterator diff --git a/db/jig/mapper.php b/db/jig/mapper.php index 79e24924..52f36acb 100644 --- a/db/jig/mapper.php +++ b/db/jig/mapper.php @@ -497,13 +497,12 @@ function copyfrom($var,$func=NULL) { } /** - * Populate array variable with mapper fields + * Populate hive array variable with mapper fields * @return NULL - * @param $var mixed + * @param $key string **/ - function copyto(&$var) { - if (is_string($var)) - $var=&\Base::instance()->ref($key); + function copyto($key) { + $var=&\Base::instance()->ref($key); foreach ($this->document as $key=>$field) $var[$key]=$field; } diff --git a/db/mongo/mapper.php b/db/mongo/mapper.php index f12dc65e..d5645412 100644 --- a/db/mongo/mapper.php +++ b/db/mongo/mapper.php @@ -347,13 +347,12 @@ function copyfrom($var,$func=NULL) { } /** - * Populate array variable with mapper fields + * Populate hive array variable with mapper fields * @return NULL - * @param $var mixed + * @param $key string **/ - function copyto($var) { - if (is_string($var)) - $var=&\Base::instance()->ref($key); + function copyto($key) { + $var=&\Base::instance()->ref($key); foreach ($this->document as $key=>$field) $var[$key]=$field; } diff --git a/db/sql/mapper.php b/db/sql/mapper.php index 3c65ff9f..9519cfab 100644 --- a/db/sql/mapper.php +++ b/db/sql/mapper.php @@ -603,13 +603,12 @@ function copyfrom($var,$func=NULL) { } /** - * Populate array variable with mapper fields + * Populate hive array variable with mapper fields * @return NULL - * @param $var mixed + * @param $key string **/ - function copyto(&$var) { - if (is_string($var)) - $var=&\Base::instance()->ref($var); + function copyto($key) { + $var=&\Base::instance()->ref($key); foreach ($this->fields+$this->adhoc as $key=>$field) $var[$key]=$field['value']; }