• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Current post id from bb code formatter

I'm trying to find out the post id a bb code belongs to from the bb code formatter.
I've dump recursively the three arrays I have access to from that bb code callback: tag, renderStates and view parameters but it seems they do not contain the information I'm looking for.

Now knowing that the view is of type XenForo_ViewPublic_Thread_View I'm trying to fish that information from some other callback.
Surely somewhere there is a loop that goes through each posts on the page and renders the bb codes.
I wonder if I can somehow dump the callstack from PHP, that could help I guess.
That or proper development documentation, ho wait...
Here is my callstack:
Here is the code I used to produce it:
  public function whoDidThat()
        $count = 0;
        foreach($who as $k=>$v)
            if ($count++ > 0)
                if ( $count>2)
        return $result;
Now I just have to dig.