Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How do you create a method to get PagerModule's offset?
From my understanding, every class is basically "pluggable" since the majority of not all of them extend the Gnd_Pluggable class.
I am trying to create a new method to get the Offset from the PagerModule class because it is private, and I cannot access it unless I create a getter for that field.
I tried putting this into plugin, but nothing happens. Am I misinterpreting what the developer docs is saying?
public function PagerModule_GetOffset_Create ( $Sender )
{
return $Sender->Offset;
}
This is the error I am getting, which makes sense since $Offset is out of scope.
Fatal error: Cannot access private property PagerModule::$Offset
I am trying to create a new method to get the Offset from the PagerModule class because it is private, and I cannot access it unless I create a getter for that field.
I tried putting this into plugin, but nothing happens. Am I misinterpreting what the developer docs is saying?
public function PagerModule_GetOffset_Create ( $Sender )
{
return $Sender->Offset;
}
This is the error I am getting, which makes sense since $Offset is out of scope.
Fatal error: Cannot access private property PagerModule::$Offset
Tagged:
0
Best Answer
-
Todd Vanilla StaffUnfortunately, this you are reaching the limit of php with this one. Usually when you want access to something this small I'd just give us a shout or, better yet, a pull request and we'll add a method or just make the property public.0
Answers