diff --git a/classes/object/Object.class.php b/classes/object/Object.class.php index f37fa60f2..0e100c077 100644 --- a/classes/object/Object.class.php +++ b/classes/object/Object.class.php @@ -59,6 +59,15 @@ $this->variables[$key] = $val; } + /** + * @brief 추가된 변수의 key, value들을 추가 + **/ + function adds($object) { + if( (is_object($object) && count(array_keys($object))) || (is_array($object) && count($object))) { + foreach($object as $key => $val) $this->add($key, $val); + } + } + /** * @brief 추가된 변수의 key에 해당하는 값을 return **/ @@ -66,6 +75,19 @@ return $this->variables[$key]; } + /** + * @brief 추가된 변수의 key들에 해당하는 값을 return + **/ + function gets() { + $num_args = func_num_args(); + $args_list = func_get_args(); + for($i=0;$i<$num_args;$i++) { + $key = $args_list[$i]; + $output->{$key} = $this->gets($key); + } + return $output; + } + /** * @brief 추가변수 전체 return **/ @@ -86,6 +108,5 @@ function toBoolean() { return $this->toBool(); } - } ?>