public function &getPlugin($type, $element = null)
  	{
		$results = array();
		$this->_load();

		foreach($this->_plugins as $plugin) {
			if (is_null($element)) {
				if($plugin->type == $type) {
					$results[] = $plugin;
				}
			} elseif($plugin->type == $type && $plugin->element == $element) {
				 $results = $plugin;
			}
		}

		return $results;
  	}
public function &getPlugin($type, $element = null)
  	{
		$results = array();
		$this->_load();

		foreach($this->_plugins as $plugin) {
			if (is_null($element)) {
				if($plugin->type == $type) {
					$results[] = $plugin;
				}
			} elseif($plugin->type == $type && $plugin->element == $element) {
				 $results = $plugin;
			}
		}

		return $results;
  	}
public function & getPlugin ( $ type , $ element = null ) { $ results = array ( ) ; $ this -> _load ( ) ; foreach ( $ this -> _plugins as $ plugin ) { if ( is_null ( $ element ) ) { if ( $ plugin -> type == $ type ) { $ results [ ] = $ plugin ; } } elseif ( $ plugin -> type == $ type && $ plugin -> element == $ element ) { $ results = $ plugin ; } } return $ results ; }
Get the plugin data of a specific type if no specific plugin is specified
otherwise only the specific plugin data is returned

@access public
@param string 	$type 	The plugin type, relates to the sub-directory in the plugins directory
@param string 	$plugin	The plugin element
@return mixed 	An array of plugin data objects, or a plugin data object
Get the plugin data of a specific type if no specific plugin is specified otherwise only the specific plugin data is returned