Download the PHP package spiral/ide-helper without Composer
On this page you can find all versions of the php package spiral/ide-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ide-helper
Spiral IDE Helper
This module generate IDE help files for spiral framework components like Controllers, RequestsFilters, Records, Documents and etc.
Install
Usage
Configuration and Terminology
The module is configured via config/modules/ide-helper.php
file.
The config has 3 sections: writers
, locators
, scopes
.
VIEW CONFIG FILE
locators
section includes any Locators used by the module. Locator is a class that responsible for
searching classes and it's [magic] members.
writers
section includes any Writers used by the modules. Writers are responsible to write the
stuff collected by locators to some destination.
Both locators and writers must be represented by associated array, where the key is any human
reasonable name for locator or writer and the value is class string or
\Spiral\Core\Container\Autowire
instance (can be obtained by bind
method).
scopes
section is also associated array, where the keys is any human reasonable name for the
scope and the value is scope definition. Scope definition consists of number of locators and
writers to execute, just check config above to understand the syntax. Each scope is executed
independently.
The package includes following locators and writers:
BindingsLocator
— find short bindings (SharedTrait)ContainersLocator
— find container and it's bindingsDocumentsLocator
— find documents and it's fieldsRecordsLocator
— find records and it's fieldsFilePerClassWriter
— write every class to it's own fileSingleFileWriter
— write everything to one file
Extending
Custom Locators
To create your own locator you must implement \Spiral\IdeHelper\Locators\LocatorInerface
:
and then register it in configuration file.
Custom Writers
Same as custom locator but \Spiral\IdeHelper\Writers\WriterInterface
interface:
FilePerClassWriter
and SingleFileWriter
are using \Spiral\IdeHelper\Rendere\RendererInterface
for rendering content, so if you want only to change the way files are looks like you can create
your own implementation.