Hi, In PHP, is there any way to make class method automatically call some other specified method before the current one? (I'm basically looking to simulate before_filter from Ruby on Rails.
For example, calling function b directly but getting the output 'hello you'.
function a()
{
echo 'hello';
}
function b()
{
echo 'you';
}
Any advice appreciated.
Thanks.