-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
enhancementEnhancement to the frameworkEnhancement to the framework
Description
Currently Phalcon\Translate\InterpolatorFactory::newInstance looks as follows:
public function newInstance(string! name) -> <InterpolatorInterface>
{
var definition;
this->checkService(name);
let definition = this->mapper[name];
return create_instance(definition);
}this->checkService(name);
From design point of view, child class shouldn't know what internal check need to perform. It is base class responsibility.
let definition = this->mapper[name];
For the same reason child class should know nothing about the name of the protected property of the base class (as well as the signature of that property). It will be better to use an interface method here
I think need to merge
this->checkService(name);
let definition = this->mapper[name];into an interface method and move to a base class.
Metadata
Metadata
Assignees
Labels
enhancementEnhancement to the frameworkEnhancement to the framework
Type
Projects
Status
Released