protected function merge(\stdClass $object1, \stdClass $object2)
    {
        return array_to_object(
            array_replace_recursive(object_to_array($object1), object_to_array($object2))
        );
    }
protected function merge(\stdClass $object1, \stdClass $object2)
    {
        return array_to_object(
            array_replace_recursive(object_to_array($object1), object_to_array($object2))
        );
    }
protected function merge ( \ stdClass $ object1 , \ stdClass $ object2 ) { return array_to_object ( array_replace_recursive ( object_to_array ( $ object1 ) , object_to_array ( $ object2 ) ) ) ; }
Merges two configurations of type \stdClass.

@param stdClass $object1 The master configuration
@param stdClass $object2 The configuration to merge with master

@author Benjamin Carl <opensource@clickalicious.de>

@return \stdClass The merged result
Merges two configurations of type \ stdClass .