当前位置: 首页>>代码示例>>PHP>>正文


PHP Frame_Decorator::__construct方法代码示例

本文整理汇总了PHP中Frame_Decorator::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Frame_Decorator::__construct方法的具体用法?PHP Frame_Decorator::__construct怎么用?PHP Frame_Decorator::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Frame_Decorator的用法示例。


在下文中一共展示了Frame_Decorator::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list

 /**
  * Class constructor
  *
  * @param Frame $frame the bullet frame to decorate
  * @param DOMPDF $dompdf the document's dompdf object
  */
 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     $style = $frame->get_style();
     $url = $style->list_style_image;
     $frame->get_node()->setAttribute("src", $url);
     $this->_img = new Image_Frame_Decorator($frame, $dompdf);
     parent::__construct($this->_img, $dompdf);
     list($width, $height) = dompdf_getimagesize($this->_img->get_image_url());
     // Resample the bullet image to be consistent with 'auto' sized images
     // See also Image_Frame_Reflower::get_min_max_width
     // Tested php ver: value measured in px, suffix "px" not in value: rtrim unnecessary.
     $this->_width = (double) rtrim($width, "px") * 72 / DOMPDF_DPI;
     $this->_height = (double) rtrim($height, "px") * 72 / DOMPDF_DPI;
     //If an image is taller as the containing block/box, the box should be extended.
     //Neighbour elements are overwriting the overlapping image areas.
     //Todo: Where can the box size be extended?
     //Code below has no effect.
     //See block_frame_reflower _calculate_restricted_height
     //See generated_frame_reflower, Dompdf:render() "list-item", "-dompdf-list-bullet"S.
     //Leave for now
     //if ($style->min_height < $this->_height ) {
     //  $style->min_height = $this->_height;
     //}
     //$style->height = "auto";
 }
开发者ID:agashish,项目名称:test_new,代码行数:31,代码来源:list_bullet_image_frame_decorator.cls.php

示例2:

  function __construct(Frame $frame, DOMPDF $dompdf) {
    if ( !$frame->is_text_node() )
      throw new DOMPDF_Exception("Text_Decorator can only be applied to #text nodes.");

    parent::__construct($frame, $dompdf);
    $this->_text_spacing = null;
  }
开发者ID:hendrosteven,项目名称:f3-template,代码行数:7,代码来源:text_frame_decorator.cls.php

示例3: array

 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame, $dompdf);
     $this->_line_boxes = array(new Line_Box($this));
     $this->_counters = array(self::DEFAULT_COUNTER => 0);
     $this->_cl = 0;
 }
开发者ID:practo,项目名称:dompdf,代码行数:7,代码来源:block_frame_decorator.cls.php

示例4:

 /**
  * Class constructor
  *
  * @param Frame $frame the frame to decorate
  */
 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame, $dompdf);
     $this->_page_full = false;
     $this->_in_table = 0;
     $this->_bottom_page_margin = null;
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:12,代码来源:page_frame_decorator.cls.php

示例5: array

 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame, $dompdf);
     $this->_lines = array(self::$_initial_line_state);
     $this->_counters = array(self::DEFAULT_COUNTER => 0);
     $this->_cl = 0;
 }
开发者ID:rodolfobais,项目名称:proylectura,代码行数:7,代码来源:block_frame_decorator.cls.php

示例6: tempnam

 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame);
     $url = $frame->get_node()->getAttribute("src");
     if (!DOMPDF_ENABLE_REMOTE && strstr($url, "://")) {
         $this->_remote = false;
         $this->_image_url = DOMPDF_LIB_DIR . "/res/broken_image.png";
     } else {
         if (DOMPDF_ENABLE_REMOTE && strstr($url, "://")) {
             // Download remote files to a temporary directory
             $this->_remote = true;
             $this->_image_url = tempnam(DOMPDF_TEMP_DIR, "dompdf_img_");
             file_put_contents($this->_image_url, file_get_contents($url));
         } else {
             $this->_remote = false;
             $this->_image_url = build_url($dompdf->get_protocol(), $dompdf->get_host(), $dompdf->get_base_path(), $url);
         }
     }
     if (!is_readable($this->_image_url) || !filesize($this->_image_url)) {
         $this->_remote = false;
         $this->_image_url = DOMPDF_LIB_DIR . "/res/broken_image.png";
     }
     // We need to preserve the file extenstion
     $i = strrpos($url, ".");
     if ($i === false) {
         throw new DOMPDF_Exception("Unknown image type: {$url}.");
     }
     $this->_image_ext = strtolower(substr($url, $i + 1));
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:29,代码来源:image_frame_decorator.cls.php

示例7: array

 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame, $dompdf);
     $this->_lines = array(array("frames" => array(), "wc" => 0, "y" => null, "w" => 0, "h" => 0));
     $this->_counters = array(self::DEFAULT_COUNTER => 0);
     $this->_cl = 0;
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:7,代码来源:block_frame_decorator.cls.php

示例8: list

 /**
  * Class constructor
  *
  * @param Frame $frame the frame to decorate
  * @param DOMPDF $dompdf the document's dompdf object (required to resolve relative & remote urls)
  */
 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     global $_dompdf_warnings;
     parent::__construct($frame, $dompdf);
     $url = $frame->get_node()->getAttribute("src");
     list($this->_image_url, $this->_image_ext) = Image_Cache::resolve_url($url, $dompdf->get_protocol(), $dompdf->get_host(), $dompdf->get_base_path());
 }
开发者ID:emeraldstudio,项目名称:somosmaestros,代码行数:13,代码来源:image_frame_decorator.cls.php

示例9: Cellmap

 function __construct(Frame $frame)
 {
     parent::__construct($frame);
     $this->_cellmap = new Cellmap($this);
     $this->_min_width = null;
     $this->_max_width = null;
     $this->_state = array();
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:8,代码来源:table_frame_decorator.cls.php

示例10:

 function __construct(Frame $frame)
 {
     if ($frame->get_node()->nodeName != "#text") {
         throw new DOMPDF_Exception("Text_Decorator can only be applied to #text nodes.");
     }
     parent::__construct($frame);
     $this->_text_spacing = null;
 }
开发者ID:andrewroth,项目名称:c4c_intranet,代码行数:8,代码来源:text_frame_decorator.cls.php

示例11: Cellmap

 /**
  * Class constructor
  *
  * @param Frame $frame the frame to decorate
  */
 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame, $dompdf);
     $this->_cellmap = new Cellmap($this);
     $this->_min_width = null;
     $this->_max_width = null;
     $this->_headers = array();
     $this->_footers = array();
 }
开发者ID:teju,项目名称:Android,代码行数:14,代码来源:table_frame_decorator.cls.php

示例12:

 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame, $dompdf);
     $style = $this->_frame->get_style();
     $style->width = 0;
     $style->height = 0;
     $style->margin = 0;
     $style->padding = 0;
 }
开发者ID:fredcido,项目名称:simuweb,代码行数:9,代码来源:null_frame_decorator.cls.php

示例13: list

 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     $style = $frame->get_style();
     $url = $style->list_style_image;
     $frame->get_node()->setAttribute("src", $url);
     $this->_img = new Image_Frame_Decorator($frame, $dompdf);
     parent::__construct($this->_img, $dompdf);
     list($width, $height) = dompdf_getimagesize($this->_img->get_image_url());
     $this->_width = (double) rtrim($width, "px") * 72 / DOMPDF_DPI;
     $this->_height = (double) rtrim($height, "px") * 72 / DOMPDF_DPI;
 }
开发者ID:EfncoPlugins,项目名称:web-portal-lite-client-portal-secure-file-sharing-private-messaging,代码行数:11,代码来源:list_bullet_image_frame_decorator.cls.php

示例14: list

 /**
  * Class constructor
  *
  * @param Frame $frame the bullet frame to decorate
  * @param DOMPDF $dompdf the document's dompdf object
  */
 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     $url = $frame->get_style()->list_style_image;
     $frame->get_node()->setAttribute("src", $url);
     $this->_img = new Image_Frame_Decorator($frame, $dompdf);
     parent::__construct($this->_img, $dompdf);
     list($width, $height) = getimagesize($this->_img->get_image_url());
     // Resample the bullet image to be consistent with 'auto' sized images
     $this->_width = (double) rtrim($width, "px") * 72 / DOMPDF_DPI;
     $this->_height = (double) rtrim($height, "px") * 72 / DOMPDF_DPI;
 }
开发者ID:SkMamtajuddin,项目名称:bamboo-invoice,代码行数:17,代码来源:list_bullet_image_frame_decorator.cls.php

示例15: Cellmap

 /**
  * Class constructor
  *
  * @param Frame  $frame the frame to decorate
  * @param DOMPDF $dompdf
  */
 function __construct(Frame $frame, DOMPDF $dompdf)
 {
     parent::__construct($frame, $dompdf);
     $this->_cellmap = new Cellmap($this);
     if ($frame->get_style()->table_layout === "fixed") {
         $this->_cellmap->set_layout_fixed(true);
     }
     $this->_min_width = null;
     $this->_max_width = null;
     $this->_headers = array();
     $this->_footers = array();
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:18,代码来源:table_frame_decorator.cls.php


注:本文中的Frame_Decorator::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。