Lets say i have a class Foo with a method printname(), Then i create an alias Bar to the Foo and make the call: Bar::printname(), I want this call to print "Bar" on the screen.
<?php
class Foo {
function printname () {
...
}
}
class_alias('Foo', 'Bar');
Bar::printname(); // Print "Bar"
In short, i want the class Foo to have a function that prints the name of the alias it's called with, and not the name of the class(Foo).
Thanks :)