protected function _check_callbacks($event, $frame)
    {
        if (!isset($this->_callbacks)) {
            $dompdf = $this->_frame->get_dompdf();
            $this->_callbacks = $dompdf->get_callbacks();
            $this->_canvas = $dompdf->get_canvas();
        }

        if (is_array($this->_callbacks) && isset($this->_callbacks[$event])) {
            $info = array(
                0 => $this->_canvas, "canvas" => $this->_canvas,
                1 => $frame,         "frame"  => $frame,
            );
            $fs = $this->_callbacks[$event];
            foreach ($fs as $f) {
                if (is_callable($f)) {
                    if (is_array($f)) {
                        $f[0]->{$f[1]}($info);
                    } else {
                        $f($info);
                    }
                }
            }
        }
    }
protected function _check_callbacks($event, $frame)
    {
        if (!isset($this->_callbacks)) {
            $dompdf = $this->_frame->get_dompdf();
            $this->_callbacks = $dompdf->get_callbacks();
            $this->_canvas = $dompdf->get_canvas();
        }

        if (is_array($this->_callbacks) && isset($this->_callbacks[$event])) {
            $info = array(
                0 => $this->_canvas, "canvas" => $this->_canvas,
                1 => $frame,         "frame"  => $frame,
            );
            $fs = $this->_callbacks[$event];
            foreach ($fs as $f) {
                if (is_callable($f)) {
                    if (is_array($f)) {
                        $f[0]->{$f[1]}($info);
                    } else {
                        $f($info);
                    }
                }
            }
        }
    }
protected function _check_callbacks ( $ event , $ frame ) { if ( ! isset ( $ this -> _callbacks ) ) { $ dompdf = $ this -> _frame -> get_dompdf ( ) ; $ this -> _callbacks = $ dompdf -> get_callbacks ( ) ; $ this -> _canvas = $ dompdf -> get_canvas ( ) ; } if ( is_array ( $ this -> _callbacks ) && isset ( $ this -> _callbacks [ $ event ] ) ) { $ info = array ( 0 => $ this -> _canvas , "canvas" => $ this -> _canvas , 1 => $ frame , "frame" => $ frame , ) ; $ fs = $ this -> _callbacks [ $ event ] ; foreach ( $ fs as $ f ) { if ( is_callable ( $ f ) ) { if ( is_array ( $ f ) ) { $ f [ 0 ] -> { $ f [ 1 ] } ( $ info ) ; } else { $ f ( $ info ) ; } } } } }
Check for callbacks that need to be performed when a given event
gets triggered on a page

@param string $event the type of event
@param Frame $frame  the frame that event is triggered on
Check for callbacks that need to be performed when a given event gets triggered on a page