hi,
Based on constructor of the class. create or destroy new methods. I often requires based on construct to disable or destroy methods within the class. Can any one help me out?
class Test
{
function __construct(userID)
{
if(!isValidUser($userID))
{ destroy(methods); }
}
function addPost()
{
}
}
Once destroy is called. The methods or selected methods should be destroyed
Hope you understand this time.