PHP Класс Yosymfony\Spress\Core\Plugin\PluginManagerBuilder

Автор: Victor Puertas ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$composerFilename
$eventDispatcher
$excludeDirs
$path
$resolver

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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() публичный Метод

Each plugin is added to PluginManager using "name" meta or its classname if that meta do not exists.
public build ( ) : PluginManager
Результат PluginManager

buildFinder() защищенный Метод

protected buildFinder ( )

getClassname() защищенный Метод

Gets the class name.
protected getClassname ( Symfony\Component\Finder\SplFileInfo $file ) : string
$file Symfony\Component\Finder\SplFileInfo
Результат string

getPluginMetas() защищенный Метод

Gets metas of a plugin.
protected getPluginMetas ( Yosymfony\Spress\Core\Plugin\PluginInterface $plugin ) : array
$plugin Yosymfony\Spress\Core\Plugin\PluginInterface The plugin
Результат array

getResolver() защищенный Метод

Gets the attribute resolver.
protected getResolver ( ) : Yosymfony\Spress\Core\Support\AttributesResolver\AttributesResolver
Результат Yosymfony\Spress\Core\Support\AttributesResolver\AttributesResolver

isValidClassName() защищенный Метод

Checks if the class name is valid.
protected isValidClassName ( string $name ) : boolean
$name string
Результат boolean

readComposerFile() защищенный Метод

Reads a "composer.json" file.
protected readComposerFile ( Symfony\Component\Finder\SplFileInfo $file ) : array
$file Symfony\Component\Finder\SplFileInfo
Результат array The parsed json filename

setComposerFilename() публичный Метод

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

Описание свойств

$composerFilename защищенное свойство

protected $composerFilename

$eventDispatcher защищенное свойство

protected $eventDispatcher

$excludeDirs защищенное свойство

protected $excludeDirs

$path защищенное свойство

protected $path

$resolver защищенное свойство

protected $resolver