yii\di\ServiceLocator::getComponents PHP Method

getComponents() public method

Returns the list of the component definitions or the loaded component instances.
public getComponents ( boolean $returnDefinitions = true ) : array
$returnDefinitions boolean whether to return component definitions instead of the loaded component instances.
return array the list of the component definitions or the loaded component instances (ID => definition or instance).
    public function getComponents($returnDefinitions = true)
    {
        return $returnDefinitions ? $this->_definitions : $this->_components;
    }