bazzline / php_component_locator_generator Goto Github PK
View Code? Open in Web Editor NEWfree as in freedom free software php locator generator component to easy up locator generation
License: GNU Lesser General Public License v3.0
free as in freedom free software php locator generator component to easy up locator generation
License: GNU Lesser General Public License v3.0
File is removed but error "file ... already exists" is outputted.
@tworzenieweb is this still needed?
Else I would put it in archived mode.
Unneccesarry fully qualified name
example generated locator
//....
/**
* @return \Net\Bazzline\Component\Cli\Arguments\Arguments
*/
public function getCliArguments()
{
return $this->fetchFromSharedInstancePool('\Net\Bazzline\Component\CommandCollection\Filesystem\Remove');
}
/**
* @return \Net\Bazzline\Component\ApiDocumentBuilder\Builder\Apigen
*/
public function getApigenBuilder()
{
return $this->fetchFromSharedInstancePool('\Net\Bazzline\Component\CommandCollection\Filesystem\Remove');
}
//...
'instances' => array(
array(
//...
'is_factory' => true,
Configuration above does not adds the "use Net\Bazzline\Component\Locator\FactoryInterface" to the generated locator
'instances' => array(
array(
//...
'is_factory' => false,
'is_shared' => true,
Configuration above will generate locator method like:
final protected function fetchFromSharedInstancePool($className)
{
if ($this->isNotInFactoryInstancePool($className)) {
if (!class_exists($className)) {
throw new InvalidArgumentException(
'class "' . $className . '" does not exist'
);
}
$instance = new $className();
$this->addToFactoryInstancePool($className, $instance);
}
return $this->getFromSharedInstancePool($className);
}
'addToSharedInstancePool' and 'isNotInSharedInstancePool' should be used.
If you add a "is_factory" => true, you get the following error.
Argument 1 passed to BlaBlaFactory::setLocator() must be an instance of Net\Bazzline\Component\Locator\LocatorInterface, instance of BlaBlaLocator given
Whenever "is_factory" is configure to "true", the "implements" configuration section has to be extended by "Net\Bazzline\Component\Locator\LocatorInterface" automatically.
Take a look at FromPropelSchemaXmlAssemblerTest::testAssembleWithValidAllData().
The Expectation is "My\Tables\One\MyTableOne" but should be "\My\Tables\One\MyTableOne".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.