PHP Class Yosymfony\Spress\Core\Plugin\PluginManagerBuilder

Author: Victor Puertas ([email protected])
Afficher le fichier Open project: spress/spress Class Usage Examples

Protected Properties

Свойство Type Description
$composerFilename
$eventDispatcher
$excludeDirs
$path
$resolver

Méthodes publiques

Méthode Description
__construct ( string $path, EventDispatcher $eventDispatcher, array $excludeDirs = [] ) Constructor.
build ( ) : PluginManager Builds the PluginManager with the plugins of a site.
setComposerFilename ( string $name ) Sets the composer filename. "composer.json" by default.

Méthodes protégées

Méthode Description
buildFinder ( )
getClassname ( Symfony\Component\Finder\SplFileInfo $file ) : string Gets the class name.
getPluginMetas ( Yosymfony\Spress\Core\Plugin\PluginInterface $plugin ) : array Gets metas of a plugin.
getResolver ( ) : Yosymfony\Spress\Core\Support\AttributesResolver\AttributesResolver Gets the attribute resolver.
isValidClassName ( string $name ) : boolean Checks if the class name is valid.
readComposerFile ( Symfony\Component\Finder\SplFileInfo $file ) : array Reads a "composer.json" file.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $path, EventDispatcher $eventDispatcher, array $excludeDirs = [] )
$path string Path to plugin folder
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcher
$excludeDirs array List of directories excluded of the scan for discovering class. Tests directories are a good example

build() public méthode

Each plugin is added to PluginManager using "name" meta or its classname if that meta do not exists.
public build ( ) : PluginManager
Résultat PluginManager

buildFinder() protected méthode

protected buildFinder ( )

getClassname() protected méthode

Gets the class name.
protected getClassname ( Symfony\Component\Finder\SplFileInfo $file ) : string
$file Symfony\Component\Finder\SplFileInfo
Résultat string

getPluginMetas() protected méthode

Gets metas of a plugin.
protected getPluginMetas ( Yosymfony\Spress\Core\Plugin\PluginInterface $plugin ) : array
$plugin Yosymfony\Spress\Core\Plugin\PluginInterface The plugin
Résultat array

getResolver() protected méthode

Gets the attribute resolver.
protected getResolver ( ) : Yosymfony\Spress\Core\Support\AttributesResolver\AttributesResolver
Résultat Yosymfony\Spress\Core\Support\AttributesResolver\AttributesResolver

isValidClassName() protected méthode

Checks if the class name is valid.
protected isValidClassName ( string $name ) : boolean
$name string
Résultat boolean

readComposerFile() protected méthode

Reads a "composer.json" file.
protected readComposerFile ( Symfony\Component\Finder\SplFileInfo $file ) : array
$file Symfony\Component\Finder\SplFileInfo
Résultat array The parsed json filename

setComposerFilename() public méthode

Sets the composer filename. "composer.json" by default.
public setComposerFilename ( string $name )
$name string The filename

Property Details

$composerFilename protected_oe property

protected $composerFilename

$eventDispatcher protected_oe property

protected $eventDispatcher

$excludeDirs protected_oe property

protected $excludeDirs

$path protected_oe property

protected $path

$resolver protected_oe property

protected $resolver