How can I access an extended Class function from an already created object?
(A) - This works, by not creating an object:
$UserType = 'User_Vote';
$vote = User::getVote($UserType)->getVoteQuery();
(B) - Trying the same idea from an already created object (this is what I want to do) returns the error: unexpected T_PAAMAYIM_NEKUDOTAYIM (unexpected '::')
$UserType = 'User_Vote';
$object = new User();
$vote = $object::getVote($UserType)->getVoteQuery();
(C) - But this works:
$UserType = 'User_Vote';
$object = new User();
$objectUserType = $object->getVote($UserType);
$finalObject = $objectUserType->getVoteQuery();
Why doesn't block (B) above with the double '::' work? It seems identical to block (A) except that the object is already created. Do I have to call each function separately as in block (C) to get around this?