Ignore:
Timestamp:
11/17/09 09:02:41 (15 years ago)
Author:
amuller
Message:

Ticket #597 - melhoria no modulo gerenciador de arquivos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/tp/dompdf/include/frame.cls.php

    r1575 r1654  
    3838 */ 
    3939 
    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 $ */ 
    4141 
    4242/** 
     
    6969  protected $_id; 
    7070 
     71  /** 
     72   * Unique id counter 
     73   */ 
     74  static protected $ID_COUNTER = 0; 
     75   
    7176  /** 
    7277   * This frame's calculated style 
     
    167172    $this->_decorator = null; 
    168173 
    169     $this->set_id( uniqid(rand()) ); 
     174    $this->set_id( self::$ID_COUNTER++ ); 
    170175  } 
    171176 
     
    288293    $x = $this->_position["x"] + 
    289294      $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"]); 
    292297    $y = $this->_position["y"] + 
    293298      $this->_style->length_in_pt(array($this->_style->margin_top, 
     
    366371   
    367372  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    } 
    370378     
    371379    if (is_numeric($x)) { 
     
    570578 
    571579    // 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 ""; 
    575583     
    576584     
    577585    $str = "<b>" . $this->_node->nodeName . ":</b><br/>"; 
    578     $str .= (string)$this->_node . "<br/>"; 
     586    //$str .= spl_object_hash($this->_node) . "<br/>"; 
    579587    $str .= "Id: " .$this->get_id() . "<br/>"; 
    580588    $str .= "Class: " .get_class($this) . "<br/>"; 
     
    587595    if ( $this->_parent ) 
    588596      $str .= "\nParent:" . $this->_parent->_node->nodeName . 
    589         " (" . (string)$this->_parent->_node . ") " . 
     597        " (" . spl_object_hash($this->_parent->_node) . ") " . 
    590598        "<br/>"; 
    591599 
    592600    if ( $this->_prev_sibling ) 
    593601      $str .= "Prev: " . $this->_prev_sibling->_node->nodeName . 
    594         " (" . (string)$this->_prev_sibling->_node . ") " . 
     602        " (" . spl_object_hash($this->_prev_sibling->_node) . ") " . 
    595603        "<br/>"; 
    596604 
    597605    if ( $this->_next_sibling ) 
    598606      $str .= "Next: " . $this->_next_sibling->_node->nodeName . 
    599         " (" . (string)$this->_next_sibling->_node . ") " . 
     607        " (" . spl_object_hash($this->_next_sibling->_node) . ") " . 
    600608        "<br/>"; 
    601609 
     
    619627          if ($frame instanceof Text_Frame_Decorator) { 
    620628            $str .= "\ntext: ";           
    621             $str .= htmlspecialchars($frame->get_text()); 
     629            $str .= "'". htmlspecialchars($frame->get_text()) ."'"; 
    622630          } 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()) . ")"; 
    624632          } 
    625633        } 
Note: See TracChangeset for help on using the changeset viewer.