Changeset 1654 for sandbox/filemanager/tp/dompdf/include/frame.cls.php
- Timestamp:
- 11/17/09 09:02:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/tp/dompdf/include/frame.cls.php
r1575 r1654 38 38 */ 39 39 40 /* $Id: frame.cls.php ,v 1.11 2006/07/07 21:31:03 benjcarson Exp$ */40 /* $Id: frame.cls.php 186 2009-10-19 22:42:06Z eclecticgeek@gmail.com $ */ 41 41 42 42 /** … … 69 69 protected $_id; 70 70 71 /** 72 * Unique id counter 73 */ 74 static protected $ID_COUNTER = 0; 75 71 76 /** 72 77 * This frame's calculated style … … 167 172 $this->_decorator = null; 168 173 169 $this->set_id( uniqid(rand()));174 $this->set_id( self::$ID_COUNTER++ ); 170 175 } 171 176 … … 288 293 $x = $this->_position["x"] + 289 294 $this->_style->length_in_pt(array($this->_style->margin_left, 290 $this->_style->border_left_width),291 $this->_containing_block["w"]);295 $this->_style->border_left_width), 296 $this->_containing_block["w"]); 292 297 $y = $this->_position["y"] + 293 298 $this->_style->length_in_pt(array($this->_style->margin_top, … … 366 371 367 372 function set_containing_block($x = null, $y = null, $w = null, $h = null) { 368 if ( is_array($x) ) 369 extract($x); 373 if ( is_array($x) ){ 374 foreach($x AS $key => $val){ 375 $$key = $val; 376 } 377 } 370 378 371 379 if (is_numeric($x)) { … … 570 578 571 579 // Skip empty text frames 572 if ( $this->_node->nodeName == "#text" &&573 preg_replace("/\s/", "", $this->_node->data) === "" )574 return "";580 // if ( $this->_node->nodeName == "#text" && 581 // preg_replace("/\s/", "", $this->_node->data) === "" ) 582 // return ""; 575 583 576 584 577 585 $str = "<b>" . $this->_node->nodeName . ":</b><br/>"; 578 $str .= (string)$this->_node. "<br/>";586 //$str .= spl_object_hash($this->_node) . "<br/>"; 579 587 $str .= "Id: " .$this->get_id() . "<br/>"; 580 588 $str .= "Class: " .get_class($this) . "<br/>"; … … 587 595 if ( $this->_parent ) 588 596 $str .= "\nParent:" . $this->_parent->_node->nodeName . 589 " (" . (string)$this->_parent->_node. ") " .597 " (" . spl_object_hash($this->_parent->_node) . ") " . 590 598 "<br/>"; 591 599 592 600 if ( $this->_prev_sibling ) 593 601 $str .= "Prev: " . $this->_prev_sibling->_node->nodeName . 594 " (" . (string)$this->_prev_sibling->_node. ") " .602 " (" . spl_object_hash($this->_prev_sibling->_node) . ") " . 595 603 "<br/>"; 596 604 597 605 if ( $this->_next_sibling ) 598 606 $str .= "Next: " . $this->_next_sibling->_node->nodeName . 599 " (" . (string)$this->_next_sibling->_node. ") " .607 " (" . spl_object_hash($this->_next_sibling->_node) . ") " . 600 608 "<br/>"; 601 609 … … 619 627 if ($frame instanceof Text_Frame_Decorator) { 620 628 $str .= "\ntext: "; 621 $str .= htmlspecialchars($frame->get_text());629 $str .= "'". htmlspecialchars($frame->get_text()) ."'"; 622 630 } else { 623 $str .= "\nBlock: " . $frame->get_node()->nodeName . " (" . (string)$frame->get_node() . ")";631 $str .= "\nBlock: " . $frame->get_node()->nodeName . " (" . spl_object_hash($frame->get_node()) . ")"; 624 632 } 625 633 }
Note: See TracChangeset
for help on using the changeset viewer.