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?

edited June 2011 in Vanilla 2.0 - 2.8
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

Best Answer

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓
    Unfortunately, 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.

Answers

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓
    Unfortunately, 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.
Sign In or Register to comment.