-
Notifications
You must be signed in to change notification settings - Fork 45
5. Plugins
Just implement PhpDA\Parser\Filter\NamespaceFilterInterface
to your filter class to modify the namespace of collected dependencies.
After that you can add it to the configuration. For autoloading add your plugin to classMap configuration.
Just implement PhpDA\Reference\ValidatorInterface
to your reference validator class to verify each dependency.
After that you can add it to the configuration. For autoloading add your plugin to classMap configuration.
Visitors are provided by Visitor-Pattern implemented by Nikic's Php-Parser
.
Read the docs
to get into the idea of visitor.
To get your own visitor, just create a new one by extending
PhpDA\Parser\Visitor\AbstractVisitor
.
Beside this you have to implement one of the following Interfaces to declare the concern by contract:
PhpDA\Parser\Visitor\Feature\UsedNamespaceCollectorInterface
PhpDA\Parser\Visitor\Feature\UnsupportedNamespaceCollectorInterface
PhpDA\Parser\Visitor\Feature\NamespacedStringCollectorInterface
After that you can add it to the configuration. For autoloading add your plugin to classMap configuration.
To get your own Formatter to create other reports, just implement PhpDA\Writer\Strategy\StrategyInterface
to a new one.
After that you can add it to the configuration. For autoloading add your plugin to classMap configuration.