src/Thujohn/Pdf/dompdf/include/renderer.cls.php
protected function _check_callbacks($event, $frame) {
    if (!isset($this->_callbacks)) {
      $this->_callbacks = $this->_dompdf->get_callbacks();
    }
    
    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)) {
      $this->_callbacks = $this->_dompdf->get_callbacks();
    }
    
    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 ) ) { $ this -> _callbacks = $ this -> _dompdf -> get_callbacks ( ) ; } 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 frame

@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 frame