public function extend($object=null) {
    $args = self::_wrapArgs(func_get_args(), 1);
    
    $num_args = func_num_args();
    if($num_args === 1) return $object;
    
    $is_object = is_object($object);
    $array = (array) $object;
    $__ = new self;
    $extensions = $__->rest(func_get_args());
    foreach($extensions as $extension) {
      $extension = (array) $extension;
      $array = array_merge($array, $extension);
    }
    return self::_wrap(($is_object) ? (object) $array : $array);
  }
public function extend($object=null) {
    $args = self::_wrapArgs(func_get_args(), 1);
    
    $num_args = func_num_args();
    if($num_args === 1) return $object;
    
    $is_object = is_object($object);
    $array = (array) $object;
    $__ = new self;
    $extensions = $__->rest(func_get_args());
    foreach($extensions as $extension) {
      $extension = (array) $extension;
      $array = array_merge($array, $extension);
    }
    return self::_wrap(($is_object) ? (object) $array : $array);
  }
public function extend ( $ object = null ) { $ args = self :: _wrapArgs ( func_get_args ( ) , 1 ) ; $ num_args = func_num_args ( ) ; if ( $ num_args === 1 ) return $ object ; $ is_object = is_object ( $ object ) ; $ array = ( array ) $ object ; $ __ = new self ; $ extensions = $ __ -> rest ( func_get_args ( ) ) ; foreach ( $ extensions as $ extension ) { $ extension = ( array ) $ extension ; $ array = array_merge ( $ array , $ extension ) ; } return self :: _wrap ( ( $ is_object ) ? ( object ) $ array : $ array ) ; }
Copy all properties from the source objects into the destination object
Copy all properties from the source objects into the destination object