\DephpugPluginReflection

Class to get a list of classes that match an interface

Summary

Methods
Properties
Constants
__construct()
setPlugins()
getPlugins()
addPlugin()
isPlugin()
$interfaceReflection
$core
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$plugins
N/A

Properties

$interfaceReflection

$interfaceReflection : 

Interface to match classes

Type

$core

$core : 

Object Core

Type

$plugins

$plugins : 

Objects with interface setted in contructor

Type

Methods

__construct()

__construct(\Dephpug\Core  $core, string  $interfaceReflection = 'Dephpug\Interfaces\iCommand') 

Parameters

\Dephpug\Core $core

with pointer

string $interfaceReflection

name of interface to match

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

setPlugins()

setPlugins() : void

Get all plugins and set in an attribute

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

getPlugins()

getPlugins() : array

Get list of plugins

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

array —

$plugins Indicates all plugins added in this obj

addPlugin()

addPlugin(string  $klass) 

Add plugin to list

Parameters

string $klass

Indicates the name of class to instantiate

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

isPlugin()

isPlugin(string  $klass) : boolean

Check if a class is a plugin matching the interface

Parameters

string $klass
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///src/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293

Returns

boolean —

Indicates if a class is a plugin