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


PHP CSS::get方法代码示例

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


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

示例1: NullBox

 function &create()
 {
     $box =& new NullBox();
     $css_state = new CSSState(CSS::get());
     $css_state->pushState();
     $box->readCSS($css_state);
     return $box;
 }
开发者ID:dadigo,项目名称:simpleinvoices,代码行数:8,代码来源:box.null.php

示例2: testCSSParseMarginBoxesTopLeftSize

 function testCSSParseMarginBoxesTopLeftSize()
 {
     parse_config_file('../html2ps.config');
     $media =& Media::predefined('A4');
     $media->set_margins(array('left' => 10, 'top' => 10, 'right' => 10, 'bottom' => 10));
     $pipeline =& PipelineFactory::create_default_pipeline('utf-8', 'test.pdf');
     $pipeline->_prepare($media);
     $pipeline->_cssState = array(new CSSState(CSS::get()));
     parse_css_atpage_rules('@page { @top-left { content: "TEXT"; } }', $pipeline);
     $boxes = $pipeline->reflow_margin_boxes(1, $media);
     $box =& $boxes[CSS_MARGIN_BOX_SELECTOR_TOP_LEFT];
     $this->assertNotEqual($box->get_width(), 0);
     $expected_width = $pipeline->output_driver->stringwidth('TEXT', 'Times-Roman', 'iso-8859-1', 12);
     $this->assertTrue($box->get_width() >= $expected_width);
     $this->assertEqual($box->get_height(), mm2pt(10));
 }
开发者ID:sharmarakesh,项目名称:EduSec2.0.0,代码行数:16,代码来源:test.css.margin.boxes.php

示例3: fake_box

 function fake_box(&$box)
 {
     // Create the fake box object
     $fake_state = new CSSState(CSS::get());
     $fake_state->pushState();
     $fake = null;
     $fake_box = new BlockBox($fake);
     $fake_box->readCSS($fake_state);
     // Setup fake box size
     $fake_box->put_left($this->left);
     $fake_box->put_width($this->right - $this->left);
     $fake_box->put_top($this->top - $box->baseline);
     $fake_box->put_height($this->top - $this->bottom);
     // Setup padding value
     $fake_box->setCSSProperty(CSS_PADDING, $box->getCSSProperty(CSS_PADDING));
     // Setup fake box border and background
     $fake_box->setCSSProperty(CSS_BACKGROUND, $box->getCSSProperty(CSS_BACKGROUND));
     $fake_box->setCSSProperty(CSS_BORDER, $box->getCSSProperty(CSS_BORDER));
     return $fake_box;
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:20,代码来源:box.inline.php

示例4: register_css_property

 function register_css_property(&$handler)
 {
     $property = $handler->get_property_code();
     $name = $handler->get_property_name();
     $css =& CSS::get();
     $css->_handlers[$property] =& $handler;
     $css->_mapping[$name] = $property;
 }
开发者ID:isantiago,项目名称:foswiki,代码行数:8,代码来源:css.inc.php

示例5: rebuild

 public function rebuild()
 {
     $flavorId = $this->flavor_folder;
     if (!$flavorId) {
         throw new \Exception('Cannot merge a theme without a flavor.');
     }
     $db = new \Core\Db();
     $moduleList = $db->select('module_id')->singleData('module_id')->from(':module')->where('is_active=1')->all();
     $css = new CSS($this);
     try {
         $data = $css->get();
         $moduleData = $css->getModule($moduleList);
         $css->reBuildModule($moduleList, $this->name);
         $appData = $css->getApp();
         $css->set($data, null, $moduleData . $appData, $this->name);
     } catch (\Exception $e) {
         if (PHPFOX_DEBUG) {
             exit("error:" . $e->getMessage());
         }
         return false;
     }
 }
开发者ID:Goudarzi-hahram,项目名称:phpfox,代码行数:22,代码来源:Object.php

示例6: reset_css

 function reset_css()
 {
     $css_cache = CSSCache::get();
     $this->_defaultCSS = $css_cache->compile('resource://default.css', file_get_contents(HTML2PS_DIR . 'default.css'), $this);
     $this->_css = array();
     $this->push_css();
     $this->_cssState = array(new CSSState(CSS::get()));
 }
开发者ID:aedvalson,项目名称:Nexus,代码行数:8,代码来源:pipeline.class.php

示例7: file_get_contents

 function &_layout_item($data_id, &$media, $offset, &$context, &$postponed_filter)
 {
     $this->_reset_page_at_rules();
     $css_cache = CSSCache::get();
     $this->_defaultCSS = $css_cache->compile("resource://default.css", file_get_contents(HTML2PS_DIR . '/default.css'));
     $this->_css = array();
     $this->pushCSS();
     $this->_cssState = array(new CSSState(CSS::get()));
     $font = $this->_cssState[0]->getProperty(CSS_FONT);
     $font->units2pt(0);
     $this->_cssState[0]->setProperty(CSS_FONT, $font);
     $data = $this->fetch($data_id);
     if (is_null($data)) {
         $dummy = null;
         return $dummy;
     }
     // Run raw data filters
     for ($i = 0; $i < count($this->data_filters); $i++) {
         $data = $this->data_filters[$i]->process($data);
     }
     // Parse the raw data
     $box =& $this->parser->process($data->get_content(), $this);
     /**
      * Run obligatory tree filters
      */
     /**
      * height-constraint processing filter;
      */
     $filter = new PreTreeFilterHeightConstraint();
     $filter->process($box, $data, $this);
     /**
      * Footnote support filter
      */
     $filter = new PreTreeFilterFootnotes();
     $filter->process($box, $data, $this);
     // Run pre-layout tree filters
     for ($i = 0, $size = count($this->pre_tree_filters); $i < $size; $i++) {
         $this->pre_tree_filters[$i]->process($box, $data, $this);
     }
     /**
      * Auto-detect top/bottom margin size (only if both top and bottom margins have zero value)
      */
     if ($media->margins['top'] == 0 && $media->margins['bottom'] == 0) {
         $boxes = $this->reflow_margin_boxes(0, $media);
         $media->margins['top'] = max($boxes[CSS_MARGIN_BOX_SELECTOR_TOP]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_TOP_LEFT_CORNER]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_TOP_LEFT]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_TOP_CENTER]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_TOP_RIGHT]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_TOP_RIGHT_CORNER]->get_real_full_height()) / mm2pt(1);
         $media->margins['bottom'] = max($boxes[CSS_MARGIN_BOX_SELECTOR_BOTTOM]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_BOTTOM_LEFT_CORNER]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_BOTTOM_LEFT]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_BOTTOM_CENTER]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_BOTTOM_RIGHT]->get_real_full_height(), $boxes[CSS_MARGIN_BOX_SELECTOR_BOTTOM_RIGHT_CORNER]->get_real_full_height()) / mm2pt(1);
         $this->output_driver->update_media($media);
     }
     $context = new FlowContext();
     /**
      * Extract absolute/fixed positioned boxes
      */
     $positioned_filter = new PostTreeFilterPositioned($context);
     $positioned_filter->process($box, null, $this);
     $postponed_filter = new PostTreeFilterPostponed($this->output_driver);
     $postponed_filter->process($box, null, $this);
     $this->output_driver->prepare();
     $status = $this->layout_engine->process($box, $media, $this->output_driver, $context);
     if (is_null($status)) {
         error_log("Pipeline::_process_item: layout routine failed");
         $dummy = null;
         return $dummy;
     }
     // Run post-layout tree filters
     for ($i = 0; $i < count($this->post_tree_filters); $i++) {
         $this->post_tree_filters[$i]->process($box);
     }
     return $box;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:69,代码来源:pipeline.class.php

示例8: rebuild

 public function rebuild()
 {
     $flavorId = $this->flavor_folder;
     if (!$flavorId) {
         throw new \Exception('Cannot merge a theme without a flavor.');
     }
     $css = new CSS($this);
     try {
         $data = $css->get();
         $css->set($data);
     } catch (\Exception $e) {
         return false;
     }
 }
开发者ID:html5ravi,项目名称:phpfox,代码行数:14,代码来源:Object.php

示例9: file_get_contents

 function &_layout_item($data_id, &$media, $offset, &$context, &$postponed_filter)
 {
     //echo 'start:'.microtime().'<br>';
     $this->_reset_page_at_rules();
     $css_cache = CSSCache::get();
     $this->_defaultCSS = $css_cache->compile('resource://default.css', file_get_contents(HTML2PS_DIR . '/default.css'));
     $this->_css = array();
     $this->pushCSS();
     $this->_cssState = array(new CSSState(CSS::get()));
     $font = $this->_cssState[0]->getProperty(CSS_FONT);
     $font->units2pt(0);
     $this->_cssState[0]->setProperty(CSS_FONT, $font);
     $data = $this->fetch($data_id);
     if (is_null($data)) {
         return null;
     }
     // Run raw data filters
     for ($i = 0; $i < count($this->data_filters); $i++) {
         $data = $this->data_filters[$i]->process($data);
     }
     // Parse the raw data
     # kornev, optimize
     //echo '001:'.microtime().'<br>';
     $box =& $this->parser->process($data->get_content(), $this, $media);
     $this->_dispatcher->fire('after-parse', array('pipeline' => &$this, 'document' => &$box, 'media' => $media));
     //echo '002:'.microtime().'<br>';
     /**
      * height-constraint processing filter;
      */
     $filter = new PreTreeFilterHeightConstraint();
     $filter->process($box, $data, $this);
     /**
      * Footnote support filter
      */
     $filter = new PreTreeFilterFootnotes();
     $filter->process($box, $data, $this);
     // Run pre-layout tree filters
     for ($i = 0, $size = count($this->pre_tree_filters); $i < $size; $i++) {
         $this->pre_tree_filters[$i]->process($box, $data, $this);
     }
     $context = new FlowContext();
     /**
      * Extract absolute/fixed positioned boxes
      */
     $positioned_filter = new PostTreeFilterPositioned($context);
     $positioned_filter->process($box, null, $this);
     $postponed_filter = new PostTreeFilterPostponed($this->output_driver);
     $postponed_filter->process($box, null, $this);
     $this->output_driver->prepare();
     //echo 'start creations'.microtime().'<br>';
     # kornev, optimize
     $status = $this->layout_engine->process($box, $media, $this->output_driver, $context);
     //echo 'end creations'.microtime().'<br>';
     if (is_null($status)) {
         error_log('Pipeline::_process_item: layout routine failed');
         $dummy = null;
         return $dummy;
     }
     // Run post-layout tree filters
     for ($i = 0; $i < count($this->post_tree_filters); $i++) {
         $this->post_tree_filters[$i]->process($box);
     }
     return $box;
 }
开发者ID:CartworksPlatform,项目名称:cartworksplatform,代码行数:64,代码来源:pipeline.class.php


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