Answer the question
In order to leave comments, you need to log in
How to merge 2 classes into 1? Is it possible in principle?
There are let's say 2 classes, both from different namespaces (Although it doesn't matter), with 1 extending the other, but that's the question. The engine has its own implementation of class inheritance, and by the time the inheritance process starts, the required class has already been initialized. Inheritance cannot be done using standard PHP tools, since the class needs to be re-initialized.
In general, classes are allowed as follows:
<?php
namespace Test1;
class OneClass
{
public function TestClass()
{
}
}
<?php
namespace Test2;
class TestClass
{
public function twoMethod()
{
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question