public function loadComponent($name, array $config = [])
    {
        list(, $prop) = pluginSplit($name);

        return $this->{$prop} = $this->components()->load($name, $config);
    }
public function loadComponent($name, array $config = [])
    {
        list(, $prop) = pluginSplit($name);

        return $this->{$prop} = $this->components()->load($name, $config);
    }
public function loadComponent ( $ name , array $ config = [ ] ) { list ( , $ prop ) = pluginSplit ( $ name ) ; return $ this -> { $ prop } = $ this -> components ( ) -> load ( $ name , $ config ) ; }
Add a component to the controller's registry.

This method will also set the component to a property.
For example:

```
$this->loadComponent('Acl.Acl');
```

Will result in a `Toolbar` property being set.

@param string $name The name of the component to load.
@param array $config The config for the component.
@return \Cake\Controller\Component
@throws \Exception
Add a component to the controller s registry .