Swat/SwatUI.php
public function getWidget($id)
    {
        if (array_key_exists($id, $this->widgets)) {
            return $this->widgets[$id];
        } else {
            throw new SwatWidgetNotFoundException(
                "Widget with an id of '{$id}' not found.",
                0,
                $id
            );
        }
    }
public function getWidget($id)
    {
        if (array_key_exists($id, $this->widgets)) {
            return $this->widgets[$id];
        } else {
            throw new SwatWidgetNotFoundException(
                "Widget with an id of '{$id}' not found.",
                0,
                $id
            );
        }
    }
public function getWidget ( $ id ) { if ( array_key_exists ( $ id , $ this -> widgets ) ) { return $ this -> widgets [ $ id ] ; } else { throw new SwatWidgetNotFoundException ( "Widget with an id of '{$id}' not found." , 0 , $ id ) ; } }
Retrieves a widget from the internal widget list

Looks up a widget in the widget list by the widget's unique identifier.

@param string $id the id of the widget to retrieve.

@return SwatWidget a reference to the widget.

@throws SwatWidgetNotFoundException
Retrieves a widget from the internal widget list