public static function getPlugins($criteria = 'both', $exclude = false, $status = 2)
	{
		static $instances;
		if (!isset($instances)) {
			$instances = array();
		}
		$db = self::getDBO();

		$query = $db->getQuery(true)
			->select('*')
			->from('#__jfusion');

		$key = $criteria . '_' . $exclude . '_' . $status;
		if (!isset($instances[$key])) {
			if ($exclude !== false) {
				$query->where('name NOT LIKE ' . $db->quote($exclude));
			}
			$query->where('status >= ' . (int)$status);
			$query->order('ordering');

			$db->setQuery($query);
			$list = $db->loadObjectList();

			switch ($criteria) {
				case 'slave':
					if (isset($list[0])) {
						unset($list[0]);
					}
					break;
				case 'master':
					if (isset($list[0])) {
						$list = $list[0];
					} else {
						$list = null;
					}
					break;
			}
			$instances[$key] = $list;
		}
		return $instances[$key];
	}
public static function getPlugins($criteria = 'both', $exclude = false, $status = 2)
	{
		static $instances;
		if (!isset($instances)) {
			$instances = array();
		}
		$db = self::getDBO();

		$query = $db->getQuery(true)
			->select('*')
			->from('#__jfusion');

		$key = $criteria . '_' . $exclude . '_' . $status;
		if (!isset($instances[$key])) {
			if ($exclude !== false) {
				$query->where('name NOT LIKE ' . $db->quote($exclude));
			}
			$query->where('status >= ' . (int)$status);
			$query->order('ordering');

			$db->setQuery($query);
			$list = $db->loadObjectList();

			switch ($criteria) {
				case 'slave':
					if (isset($list[0])) {
						unset($list[0]);
					}
					break;
				case 'master':
					if (isset($list[0])) {
						$list = $list[0];
					} else {
						$list = null;
					}
					break;
			}
			$instances[$key] = $list;
		}
		return $instances[$key];
	}
public static function getPlugins ( $ criteria = 'both' , $ exclude = false , $ status = 2 ) { static $ instances ; if ( ! isset ( $ instances ) ) { $ instances = array ( ) ; } $ db = self :: getDBO ( ) ; $ query = $ db -> getQuery ( true ) -> select ( '*' ) -> from ( '#__jfusion' ) ; $ key = $ criteria . '_' . $ exclude . '_' . $ status ; if ( ! isset ( $ instances [ $ key ] ) ) { if ( $ exclude !== false ) { $ query -> where ( 'name NOT LIKE ' . $ db -> quote ( $ exclude ) ) ; } $ query -> where ( 'status >= ' . ( int ) $ status ) ; $ query -> order ( 'ordering' ) ; $ db -> setQuery ( $ query ) ; $ list = $ db -> loadObjectList ( ) ; switch ( $ criteria ) { case 'slave' : if ( isset ( $ list [ 0 ] ) ) { unset ( $ list [ 0 ] ) ; } break ; case 'master' : if ( isset ( $ list [ 0 ] ) ) { $ list = $ list [ 0 ] ; } else { $ list = null ; } break ; } $ instances [ $ key ] = $ list ; } return $ instances [ $ key ] ; }
returns array of plugins depending on the arguments

@param string $criteria the type of plugins to retrieve Use: master | slave | both
@param string|boolean $exclude should we exclude joomla_int
@param int $status only plugins with status equal or higher.

@return array|stdClass plugin details
returns array of plugins depending on the arguments