Positioner

Base Positioner class.

Defined (1)

The class is defined in the following location(s).

/lib/dompdf/include/positioner.cls.php  
  1. abstract class Positioner { 
  2.  
  3. /** 
  4. * @var Frame_Decorator 
  5. */ 
  6. protected $_frame; 
  7.  
  8. //........................................................................ 
  9.  
  10. function __construct(Frame_Decorator $frame) { 
  11. $this->_frame = $frame; 
  12.  
  13. /** 
  14. * Class destructor 
  15. */ 
  16. function __destruct() { 
  17. clear_object($this); 
  18. //........................................................................ 
  19.  
  20. abstract function position(); 
  21.  
  22. function move($offset_x, $offset_y, $ignore_self = false) { 
  23. list($x, $y) = $this->_frame->get_position(); 
  24.  
  25. if ( !$ignore_self ) { 
  26. $this->_frame->set_position($x + $offset_x, $y + $offset_y); 
  27.  
  28. foreach($this->_frame->get_children() as $child) { 
  29. $child->move($offset_x, $offset_y);