private function discoverComponentSections()
	{
		$loader = null;
		if (App::has('component'))
		{
			$loader = App::get('component');
		}

		$roots = array(PATH_CORE, PATH_APP);

		// group by component
		foreach ($roots as $base)
		{
			foreach (glob($base . DS . 'components' . DS . 'com_*' . DS . 'api') as $path)
			{
				// get component
				$pieces = explode(DS, $path);
				array_pop($pieces);
				$component = str_replace('com_', '', array_pop($pieces));

				if ($loader && !$loader->isEnabled('com_' . $component))
				{
					continue;
				}

				// add all matching files to section
				$this->sections[$component] = glob($path . DS . 'controllers' . DS . '*.php');
			}
		}
	}
private function discoverComponentSections()
	{
		$loader = null;
		if (App::has('component'))
		{
			$loader = App::get('component');
		}

		$roots = array(PATH_CORE, PATH_APP);

		// group by component
		foreach ($roots as $base)
		{
			foreach (glob($base . DS . 'components' . DS . 'com_*' . DS . 'api') as $path)
			{
				// get component
				$pieces = explode(DS, $path);
				array_pop($pieces);
				$component = str_replace('com_', '', array_pop($pieces));

				if ($loader && !$loader->isEnabled('com_' . $component))
				{
					continue;
				}

				// add all matching files to section
				$this->sections[$component] = glob($path . DS . 'controllers' . DS . '*.php');
			}
		}
	}
private function discoverComponentSections ( ) { $ loader = null ; if ( App :: has ( 'component' ) ) { $ loader = App :: get ( 'component' ) ; } $ roots = array ( PATH_CORE , PATH_APP ) ; // group by component foreach ( $ roots as $ base ) { foreach ( glob ( $ base . DS . 'components' . DS . 'com_*' . DS . 'api' ) as $ path ) { // get component $ pieces = explode ( DS , $ path ) ; array_pop ( $ pieces ) ; $ component = str_replace ( 'com_' , '' , array_pop ( $ pieces ) ) ; if ( $ loader && ! $ loader -> isEnabled ( 'com_' . $ component ) ) { continue ; } // add all matching files to section $ this -> sections [ $ component ] = glob ( $ path . DS . 'controllers' . DS . '*.php' ) ; } } }
Load api controller files and group by component

@return  void
Load api controller files and group by component