/** * Class constructor * * @param Frame $frame * the decoration target */ function __construct(Frame $frame, DOMPDF $dompdf) { $this->_frame = $frame; $this->_root = null; $this->_dompdf = $dompdf; $frame->set_decorator($this); }
/** * Decorate the root Frame * * @param $root Frame The frame to decorate * @param $dompdf DOMPDF The dompdf instance * @return Page_Frame_Decorator */ static function decorate_root(Frame $root, DOMPDF $dompdf) { $frame = new Page_Frame_Decorator($root, $dompdf); $frame->set_reflower(new Page_Frame_Reflower($frame)); $root->set_decorator($frame); return $frame; }
function __construct(Frame $frame) { $this->_frame = $frame; $this->_root = null; $frame->set_decorator($this); }