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