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


PHP Import::uber_src_path方法代码示例

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


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

示例1: getFiles

 public function getFiles($css, $srcPath)
 {
     $srcName = FileFolder::getFileName($srcPath);
     $newFolder = FileFolder::getPathFromFile($this->fileCss) . $srcName . "/";
     //---------------------------------------------------------
     $origSrcFolder = FileFolder::getPathFromFile($srcPath);
     //---------------------------------------------------------
     preg_match_all('/(url\\(\\"|url\\(\'|url\\(|src=\')(.*?)(\\)|\'|\\")/s', $css, $files);
     //---------------------------------------------------------
     foreach ($files[2] as $file_key => $origFilePath) {
         $fileAbPath = NULL;
         $newAbPath = NULL;
         $origFilePath = Compile::getBetweenQuot($origFilePath);
         //-----------------------------------------------------
         if (strpos($origFilePath, "../") !== false) {
             $goBack = explode("../", $origFilePath);
             $goBackAmt = sizeof($goBack);
             $srcFolderArr = explode("/", $origSrcFolder);
             $fileLocationArr = array_slice($srcFolderArr, 0, -$goBackAmt);
             $srcFolder = implode($fileLocationArr, "/") . "/";
             $filePath = end($goBack);
         } else {
             $srcFolder = $origSrcFolder;
             $filePath = $origFilePath;
             if (strpos($filePath, "http://") !== false) {
                 $fileAbPath = $filePath;
                 $filePath = FileFolder::getFileName($filePath, false);
                 $newFilePath = $newFolder . $filePath;
             }
         }
         //-----------------------------------------------------
         $filePath = FileFolder::getFileName($filePath, false, true);
         //-----------------------------------------------------
         if (is_null($fileAbPath)) {
             $fileAbPath = $srcFolder . $filePath;
         }
         if (is_null($newAbPath)) {
             $newAbPath = $newFolder . $filePath;
         }
         //-----------------------------------------------------
         $newFilePath = $srcName . "/" . $filePath;
         //-----------------------------------------------------
         if (file_exists(Import::uber_src_path() . $fileAbPath)) {
             $fileAbPath = Import::uber_src_path() . $fileAbPath;
         }
         //-----------------------------------------------------
         if ($fileContent = file_get_contents($fileAbPath)) {
             if (!file_get_contents($newAbPath)) {
                 $css = str_replace($origFilePath, $newFilePath, $css);
                 FileFolder::file_put_contents($newAbPath, $fileContent);
                 FileFolder::file_put_contents(Compile::$unminifiedPath . $this->cleanURL($fileAbPath), $fileContent);
             }
         }
     }
     return $css;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:56,代码来源:Compile.php

示例2: foreach

        //-------------------------------------------
        foreach (self::$filesLoaded as &$value) {
            if ($file == $value) {
                $bool = false;
            }
        }
        //-------------------------------------------
        if (!file_exists(GenFun::get_local_url($file))) {
            throw new Exception($file . " does not exist ");
        }
        //-------------------------------------------
        if ($bool) {
            array_push(self::$filesLoaded, $file);
            if ($include) {
                include_once $file;
            }
        }
        //-------------------------------------------
        return $bool;
    }
}
//----------------------------------------------------------------------------
Import::$uber_src_path = dirname(__FILE__) . "/";
//----------------------------------------------------------------------------
if (file_exists("ProjectGlobal.php")) {
    Import::current("ProjectGlobal.php");
}
//----------------------------------------------------------------------------
require_once "server/werm/utils/Compile.php";
//----------------------------------------------------------------------------
Compile::go();
开发者ID:awwthentic1234,项目名称:hey,代码行数:31,代码来源:Import.php

示例3: center

<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<?php 
Import::exJs(Import::uber_src_path(true) . "client/jquery/sliderPagination/jquery.pagination.js");
Import::exCss(Import::uber_src_path(true) . "client/jquery/sliderPagination/css/style.css");
?>
<!--===============================================================-->
<style>
	.sliderPagination {
		@include center();
		height:50px;
	}
</style>
<script id="SliderPagination" type="text/x-jQuery-tmpl">
	<div class="sliderPagination">
		<div id = "shell" class="sp-slider-wrapper">
			<nav>
				<a href="#" class="sp-prev">Previous</a>
				<a href="#" class="sp-next">Next</a>
			</nav>
		</div>
	</div>
</script>
<!--===================================================================-->
<script type="text/javascript">
var SliderPagination = Base.extend({
	///////////////////////////////////////////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////////
	//init var
	///////////////////////////////////////////////////////////////////////////////
	///////////////////////////////////////////////////////////////////////////////
	//---------------------------------------------------------
开发者ID:awwthentic1234,项目名称:hey,代码行数:31,代码来源:SliderPagination.php

示例4: replaceEnv

        if ($type == "code") {
            //krumo($ref->src_path);
            return Html::getExCss($newCss = self::compileSass($ref->src_path, $match[5], $index == 0 ? "" : "_match_" . $ref->index));
        }
        return "";
    }
    //------------------------------------------------------------------------
    public static function replaceEnv($file)
    {
        $content = file_get_contents($file);
        preg_match_all('/\\${(.*?)}/', $content, $match, PREG_SET_ORDER);
        if (sizeof($match) > 0) {
            $content = str_replace($match[0][0], $_ENV[$match[0][1]], $content);
        }
        return $content;
    }
    //------------------------------------------------------------------------
    public static function newPath_CFG($file)
    {
        return GlobalMas::$filesPath_absolute . "import/" . FileFolder::getFileName($file, true, true);
    }
}
//----------------------------------------------------------------------------
Import::$uber_src_path = $_ENV["uber_src"] . "/";
//----------------------------------------------------------------------------
//Import::$latestFiles = FileFolder::getLatestFile(NULL, NULL, 10);
//FileFolder::delete(Compiler::$tmpPath);
//----------------------------------------------------------------------------
//if (file_exists("ProjectGlobal.php")) Import::current("ProjectGlobal.php");
//----------------------------------------------------------------------------
//Compiler::go();
开发者ID:awwthentic1234,项目名称:hey,代码行数:31,代码来源:Import.php

示例5: chk

    }
    //------------------------------------------------------------------------
    public static function chk($file, $include = true)
    {
        //-------------------------------------------
        //init var
        //-------------------------------------------
        $bool = true;
        //-------------------------------------------
        foreach (self::$filesLoaded as &$value) {
            if ($file == $value) {
                $bool = false;
            }
        }
        //-------------------------------------------
        if (!file_exists(GenFun::get_local_url($file))) {
            throw new Exception($file . " does not exist");
        }
        //-------------------------------------------
        if ($bool) {
            array_push(self::$filesLoaded, $file);
            if ($include) {
                include_once $file;
            }
        }
        //-------------------------------------------
        return $bool;
    }
}
Import::$uber_src_path = StringUtil::replaceOverlap($_SERVER['DOCUMENT_ROOT'] . "/", dirname(__FILE__) . "/");
开发者ID:awwthentic1234,项目名称:hey,代码行数:30,代码来源:Import.php

示例6: getAllContent

 public function getAllContent($arr, $type, $minify)
 {
     $txt = "";
     $import = "";
     foreach ($arr as $value) {
         $content = $this->getFileContent($type, $value, $minify);
         //---------------------------------------------------------
         if ($this->isPropSet($this->code[$type], "type", "seperate")) {
             $file = $value['file'];
             $file = str_replace(array(Import::uber_src_path(), Import::getImportPath()), "", $file);
             //-----------------------------------------------------
             $path = $this->isPropSet($this->code[$type], "path", NULL) ? FileFolder::getFileName($file, true, true) : $this->code[$type]['path'] . FileFolder::getFileName($file, true);
             $file = $path . ($type == "tmpl" ? "_tmpl.html" : ".{$type}");
             if (!is_null($value['file']) && is_null($value['ex']) && $this->isPropSet($this->code[$type], "type", "seperate")) {
                 //$import .= $this->getExtLink($file).PHP_EOL;
                 /*krumo($this->code[$type]);
                 		krumo($file);
                 		krumo($type);
                 		krumo($value);*/
                 //krumo($value);
                 //krumo($file);
                 FileFolder::file_put_contents($this->path . $file, $content);
             }
         }
         /*else if (!is_null($value['ex']) && $this->isPropSet($this->code[$type], "forceDownload", NULL)) {
         			$txt .= $this->getExtLink($value['file']).PHP_EOL;
         			//$this->import .= $value['ex'];
         		}*/
         $txt .= $content;
     }
     if ($this->code[$type]["createImportFile"]) {
         $import_path = NULL;
         //-----------------------------------------------------
         if (is_array($this->code[$type]["createImportFile"]) && isset($this->code[$type]["createImportFile"])) {
             if (isset($this->code[$type]["createImportFile"]["path"])) {
                 $import_path = $this->code[$type]["createImportFile"]["path"];
             }
         }
         //-----------------------------------------------------
         $import_path = $this->path . (is_null($import_path) ? $this->compiler->compile_id . "_" . $type . "_import.php" : $import_path);
         FileFolder::file_put_contents($import_path, $import);
     }
     /*else {
     			$this->import .= $import;
     		}*/
     return $txt;
 }
开发者ID:awwthentic1234,项目名称:hey,代码行数:47,代码来源:Code.php


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