public function &info($key = null)
    {
        $plugin = $this->name();
        if (empty($this->_info)) {
            $this->_info = (array)quickapps("plugins.{$plugin}");
        }

        $parts = explode('.', $key);
        $getComposer = in_array('composer', $parts) || $key === null;
        $getSettings = in_array('settings', $parts) || $key === null;
        $getPermissions = in_array('permissions', $parts) || $key === null;

        if ($getComposer && !isset($this->_info['composer'])) {
            $this->_info['composer'] = $this->composer();
        }

        if ($getSettings && !isset($this->_info['settings'])) {
            $this->_info['settings'] = (array)$this->settings();
        }

        if ($getPermissions && !isset($this->_info['permissions'])) {
            $this->_info['permissions'] = (array)$this->permissions();
        }

        if ($key === null) {
            return $this->_info;
        }

        return $this->_getKey($parts);
    }
public function &info($key = null)
    {
        $plugin = $this->name();
        if (empty($this->_info)) {
            $this->_info = (array)quickapps("plugins.{$plugin}");
        }

        $parts = explode('.', $key);
        $getComposer = in_array('composer', $parts) || $key === null;
        $getSettings = in_array('settings', $parts) || $key === null;
        $getPermissions = in_array('permissions', $parts) || $key === null;

        if ($getComposer && !isset($this->_info['composer'])) {
            $this->_info['composer'] = $this->composer();
        }

        if ($getSettings && !isset($this->_info['settings'])) {
            $this->_info['settings'] = (array)$this->settings();
        }

        if ($getPermissions && !isset($this->_info['permissions'])) {
            $this->_info['permissions'] = (array)$this->permissions();
        }

        if ($key === null) {
            return $this->_info;
        }

        return $this->_getKey($parts);
    }
public function & info ( $ key = null ) { $ plugin = $ this -> name ( ) ; if ( empty ( $ this -> _info ) ) { $ this -> _info = ( array ) quickapps ( "plugins.{$plugin}" ) ; } $ parts = explode ( '.' , $ key ) ; $ getComposer = in_array ( 'composer' , $ parts ) || $ key === null ; $ getSettings = in_array ( 'settings' , $ parts ) || $ key === null ; $ getPermissions = in_array ( 'permissions' , $ parts ) || $ key === null ; if ( $ getComposer && ! isset ( $ this -> _info [ 'composer' ] ) ) { $ this -> _info [ 'composer' ] = $ this -> composer ( ) ; } if ( $ getSettings && ! isset ( $ this -> _info [ 'settings' ] ) ) { $ this -> _info [ 'settings' ] = ( array ) $ this -> settings ( ) ; } if ( $ getPermissions && ! isset ( $ this -> _info [ 'permissions' ] ) ) { $ this -> _info [ 'permissions' ] = ( array ) $ this -> permissions ( ) ; } if ( $ key === null ) { return $ this -> _info ; } return $ this -> _getKey ( $ parts ) ; }
Gets information for this plugin.

When `$full` is set to true some additional keys will be repent in the
resulting array:

- `settings`: Plugin's settings info fetched from DB.
- `composer`: Composer JSON information, converted to an array.
- `permissions`: Permissions tree for this plugin, see `PluginPackage::permissions()`

### Example:

Reading full information:

```php
$plugin->info();

// returns an array as follow:
[
'name' => 'User,
'isTheme' => false,
'hasHelp' => true,
'hasSettings' => false,
'eventListeners' => [ ... ],
'status' => 1,
'path' => '/path/to/plugin',
'settings' => [ ... ], // only when $full = true
'composer' => [ ... ], // only when $full = true
'permissions' => [ ... ], // only when $full = true
]
```

Additionally the first argument, $key, can be used to get an specific value
using a dot syntax path:

```php
$plugin->info('isTheme');
$plugin->info('settings.some_key');
```

If the given path is not found NULL will be returned

@param string $key Optional path to read from the resulting array
@return mixed Plugin information as an array if no key is given, or the
requested value if a valid $key was provided, or NULL if $key path is not
found
Gets information for this plugin .