TheSeer\phpDox\DocBlock\Factory::addParserFactory
Register a parser factory.
Signature
public function addParserFactory(string
$annotation,
FactoryInterface
$factory )
Parameters
$annotation
— string- Identifier of the parser within the registry.
$factory
— \TheSeer\phpDox\FactoryInterface- Instance of the factory to be registered.
Errors/Exceptions
-
FactoryException
- in case either one or both arguments are not of type string.
Test Coverage
Information
- Coverage: 3/3 Lines (100%)
- Tests: 3
- Passed: 3 (100%)
Tests
- [ PASSED ] — TheSeer\phpDox\Tests\Unit\DocBlock\FactoryTest::testAddParserFactory
- [ PASSED ] — TheSeer\phpDox\Tests\Unit\DocBlock\FactoryTest::testAddParserFactoryExpectingFactoryException
- [ PASSED ] — TheSeer\phpDox\Tests\Integration\DocBlock\FactoryTest::testGetInstanceByMapHandlingAFactory