vadimcomanescu/vmwarephp

isMethodAPropertyRetrieval is incompatible with some methods

rgrwkmn opened this issue · 3 comments

The AlarmManager ManagedObject has the method GetAlarm. When you try to call it, the method gets changed to a property access for 'alarm' instead of calling the function GetAlarm. Since all of the vSphere methods start with an uppercase character, I changed isMethodAPropertyRetrieval to not use strtolower when evaluating the $calledMethod. So if you do $Vhost->getSessionManager(), it will retrieve the SessionManager object, but if you do $AlarmManager->GetAlarm(), it will call the method GetAlarm.

Hey. Sorry for the very late reply, I was out in holiday for quite a while. You are right about this. Removing the lowercasing for the method name solves this problem. I will fix it and push it, or you can make a pull request if you like. Thanks.

I have a pull request open with a lot of stuff in it, take a look.

It must be fixed in the latest branch. Thanks.