Swat/SwatUI.php
private function attachToParent(SwatUIObject $object, SwatUIParent $parent)
    {
        if ($parent instanceof SwatUIParent) {
            $parent->addChild($object);
        } else {
            $class_name = get_class($parent);
            throw new SwatDoesNotImplementException(
                "Can not add object to parent. '{$class_name}' does not " .
                    'implement SwatUIParent.',
                0,
                $parent
            );
        }
    }
private function attachToParent(SwatUIObject $object, SwatUIParent $parent)
    {
        if ($parent instanceof SwatUIParent) {
            $parent->addChild($object);
        } else {
            $class_name = get_class($parent);
            throw new SwatDoesNotImplementException(
                "Can not add object to parent. '{$class_name}' does not " .
                    'implement SwatUIParent.',
                0,
                $parent
            );
        }
    }
private function attachToParent ( SwatUIObject $ object , SwatUIParent $ parent ) { if ( $ parent instanceof SwatUIParent ) { $ parent -> addChild ( $ object ) ; } else { $ class_name = get_class ( $ parent ) ; throw new SwatDoesNotImplementException ( "Can not add object to parent. '{$class_name}' does not " . 'implement SwatUIParent.' , 0 , $ parent ) ; } }
Attaches a widget to a parent widget in the widget tree

@param SwatUIObject $object the object to attach.
@param SwatUIParent $parent the parent to attach the widget to.

@throws SwatDoesNotImplementException
Attaches a widget to a parent widget in the widget tree