Hi Evert,
> Aliasing doesn't make a lot of sense, as you can always :
>
> function newMethod() {
> return $this->oldMethod();
> }
Don't think so.
You do use aliasing to handle conflicts and in the case of a conflict
there is no oldMethod.
trait A {
public function foo() {echo 'foo';}
}
trait B {
public function foo() {echo 'fooBar';}
}
class MyClass {
use A;
use B {
!foo, fooBar => foo
}
}
The result will be at runtime:
class MyClass {
public function foo() {echo 'foo';}
public function foo() {echo 'fooBar';}
}
Here you can't do something like this:
class MyClass {
use A;
use B;
}
since eventually there wont be any method in MyClass.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php