Adding services partials info
Publish PHP Package / docker (push) Successful in 7s
Details
Publish PHP Package / docker (push) Successful in 7s
Details
This commit is contained in:
parent
cc58754db8
commit
d3eec0db1f
|
@ -607,6 +607,7 @@ class mtgMetaService extends mtgMetaUnit implements mtgScope
|
|||
private $rpcs = array();
|
||||
private $events = array();
|
||||
private $user_types = array();
|
||||
private $partials = array();
|
||||
|
||||
function __construct(string $name, mtgScope $parent_scope, array $tokens = array())
|
||||
{
|
||||
|
@ -623,10 +624,16 @@ class mtgMetaService extends mtgMetaUnit implements mtgScope
|
|||
|
||||
function validate(mtgMetaInfo $meta) {}
|
||||
|
||||
function addPartial(mtgMetaService $service)
|
||||
function addPartial(mtgMetaParsedModule $module, mtgMetaService $service)
|
||||
{
|
||||
$this->setTokens(array_merge($this->getTokens(), $service->getTokens()));
|
||||
$this->parent_scope->addScope($service->getParentScope());
|
||||
$this->partials[$module->file] = $service;
|
||||
}
|
||||
|
||||
function getPartials() : array
|
||||
{
|
||||
return $this->partials;
|
||||
}
|
||||
|
||||
function getName() : string
|
||||
|
|
|
@ -719,7 +719,7 @@ class mtgMetaInfoParser implements mtgIMetaInfoParser
|
|||
$this->_error("Not a service instance '{$name}'");
|
||||
else
|
||||
{
|
||||
$existing->object->addPartial($service);
|
||||
$existing->object->addPartial($this->module, $service);
|
||||
//let's replace service with the existing one
|
||||
$service = $existing->object;
|
||||
$this->_popScope();
|
||||
|
|
|
@ -755,7 +755,7 @@ class mtgMetaInfoParser2 implements mtgIMetaInfoParser
|
|||
$this->_error("Not a service instance '{$name}'");
|
||||
else
|
||||
{
|
||||
$existing->object->addPartial($service);
|
||||
$existing->object->addPartial($this->module, $service);
|
||||
//let's replace service with the existing one
|
||||
$service = $existing->object;
|
||||
$this->_popScope();
|
||||
|
|
Loading…
Reference in New Issue