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


PHP Minify::js方法代码示例

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


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

示例1: init

 public function init()
 {
     self::$css = [];
     self::$js = [];
     $ci =& get_instance();
     $config = empty($ci->config->config) ? [] : $ci->config->config;
     $auto_pick = empty($config['minify_auto']) ? true : (bool) $config['minify_auto'];
     $this->auto_pick = $auto_pick === null ? true : $this->auto_pick;
 }
开发者ID:eternalsayed,项目名称:ci-output-minifier,代码行数:9,代码来源:minify.php

示例2: process

 function process($html)
 {
     // setup
     $min = new Minify();
     // map the dom
     $dom = new DOMDocument();
     $dom->preserveWhiteSpace = false;
     @$dom->loadHTML($html);
     // minification
     if (!DEBUG) {
         $dom = $min->less($dom, $this->template);
         $dom = $min->css($dom, $this->template);
         $dom = $min->js($dom, $this->template);
     } else {
         if ($this->useRequire()) {
             // require is "on" in debug mode
             $dom = $min->requireDebug($dom, $this->template);
         }
     }
     // process require configuration
     $this->createClient($dom);
     $output = $dom->saveHTML();
     // output the final markup - minify if not in debug
     return DEBUG ? $output : $min->html($output);
 }
开发者ID:makesites,项目名称:kisscms,代码行数:25,代码来源:template.php

示例3: Flot

	<!--  Flot (Charts) JS -->
	<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="theme/scripts/flot/excanvas.min.js"></script><![endif]-->

	<?php 
echo Minify::js(array('theme/scripts/flot/jquery.flot.js', 'theme/scripts/flot/jquery.flot.pie.js', 'theme/scripts/flot/jquery.flot.tooltip.js', 'theme/scripts/flot/jquery.flot.selection.js', 'theme/scripts/flot/jquery.flot.resize.js', 'theme/scripts/flot/jquery.flot.orderBars.js'));
$dates1 = array();
$dates2 = array();
for ($i = 30; $i > 0; $i--) {
    $dates1[] = "[" . mktime(0, 0, 0, date('n'), date('j') - $i, date('Y')) * 1000 . ", " . mt_rand(2000, 4000) . "]";
    $dates2[] = "[" . mktime(0, 0, 0, date('n'), date('j') - $i, date('Y')) * 1000 . ", " . mt_rand(400, 700) . "]";
}
?>
	
	<script>
	var charts = 
	{
		// init all charts
		init: function()
		{
			<?php 
if ($page == 'index') {
    ?>
			// mark weekends on the website traffic main graph
			this.website_traffic_graph.options.markings = this.utility.weekendAreas;

			// init website traffic main graph
			this.website_traffic_graph.init();

			// init website traffic toolbar
			this.utility.website_traffic_toolbar();
开发者ID:benoastler,项目名称:Clubband,代码行数:30,代码来源:flot_charts.php


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