Adding services partials info
Publish PHP Package / docker (push) Successful in 7s Details

This commit is contained in:
Pavel Shevaev 2025-05-15 17:05:53 +03:00
parent cc58754db8
commit d3eec0db1f
3 changed files with 10 additions and 3 deletions

View File

@ -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

View File

@ -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();

View File

@ -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();