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


PHP Env::setFromFile方法代码示例

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


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

示例1: array

<?php

/**
* @package     jelix
* @author      Laurent Jouanneau
* @contributor
* @copyright   2007-2011 Laurent Jouanneau
* @link        http://www.jelix.org
* @licence     GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html
*/
$BUILD_OPTIONS = array('MAIN_TARGET_PATH' => array("main directory where sources will be copied", '_dist', ''), 'PACKAGE_ZIP' => array("create a zip package", false), 'LIB_VERSION' => array(false, ''));
include dirname(__FILE__) . '/lib/jBuild.inc.php';
//----------------- initialize variables
Env::setFromFile('LIB_VERSION', 'lib/jelix/VERSION', true);
$SOURCE_REVISION = Git::revision(dirname(__FILE__) . '/../');
$IS_NIGHTLY = strpos($LIB_VERSION, 'SERIAL') !== false;
if ($IS_NIGHTLY) {
    $PACKAGE_NAME = 'jelix-' . str_replace('SERIAL', '', $LIB_VERSION);
    if (substr($PACKAGE_NAME, -1, 1) == '.') {
        $PACKAGE_NAME = substr($PACKAGE_NAME, 0, -1);
    }
    $PACKAGE_NAME .= '-pdf-fonts';
    $LIB_VERSION = str_replace('SERIAL', $SOURCE_REVISION, $LIB_VERSION);
} else {
    $PACKAGE_NAME = 'jelix-' . $LIB_VERSION . '-pdf-fonts';
}
if ($PACKAGE_ZIP) {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH) . $PACKAGE_NAME . '/';
} else {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH);
}
开发者ID:hadrienl,项目名称:jelix,代码行数:31,代码来源:buildfonts.php

示例2: array

<?php

/**
* @package     jelix
* @author      Laurent Jouanneau
* @contributor
* @copyright   2006-2007 Laurent Jouanneau
* @link        http://www.jelix.org
* @licence     GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html
*/
$BUILD_OPTIONS = array('MAIN_TARGET_PATH' => array("main directory where sources will be copied", '_dist', ''), 'PACKAGE_TAR_GZ' => array("create a tar.gz package", false), 'PACKAGE_ZIP' => array("create a zip package", false), 'VERSION' => array(false, 'SERIAL', ''), 'IS_NIGHTLY' => array(false, false), 'SOURCE_REVISIONs' => array(false));
include dirname(__FILE__) . '/lib/jBuild.inc.php';
//----------------- Preparation des variables d'environnement
Env::setFromFile('VERSION', 'build/VERSION', true);
$SOURCE_REVISION = Git::revision(dirname(__FILE__) . '/../');
if ($VERSION == 'SERIAL') {
    $VERSION = 'SERIAL-' . $SOURCE_REVISION;
    $IS_NIGHTLY = true;
} else {
    $IS_NIGHTLY = false;
}
if ($PACKAGE_TAR_GZ || $PACKAGE_ZIP) {
    if ($IS_NIGHTLY) {
        $PACKAGE_NAME = 'jbuildtools-nightly';
    } else {
        $PACKAGE_NAME = 'jbuildtools-' . $VERSION;
    }
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH) . $PACKAGE_NAME . '/';
} else {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH);
}
开发者ID:hadrienl,项目名称:jelix,代码行数:31,代码来源:buildjbt.php

示例3: array

/**
* @package     wikirenderer
* @author      Laurent Jouanneau
* @contributor
* @copyright   2008 Laurent Jouanneau
* @licence     GNU General Public Licence see LICENCE file or http://www.gnu.org/licenses/gpl.html
*/
$BUILD_OPTIONS = array('MAIN_TARGET_PATH' => array("main directory where sources will be copied", '_dist', ''), 'BASE_PATH' => array("the directory from which source will be copied", 'src/', ''), 'PACKAGE_TAR_GZ' => array("create a tar.gz package", false), 'PACKAGE_ZIP' => array("create a zip package", false), 'VERSION' => array(false, ''), 'HG_REVISION' => array(false));
include dirname(__FILE__) . '/jbt/lib/jBuild.inc.php';
//----------------- Preparation des variables d'environnement
if ($BASE_PATH == '') {
    die("error: BASE_PATH is empty");
}
$BASE_PATH = jBuildUtils::normalizeDir($BASE_PATH);
Env::setFromFile('VERSION', $BASE_PATH . '/VERSION', true);
$HG_REVISION = Mercurial::revision(dirname(__FILE__) . '/');
$IS_NIGHTLY = strpos($VERSION, 'SERIAL') !== false;
if ($IS_NIGHTLY) {
    $PACKAGE_NAME = 'wikirenderer-' . str_replace('SERIAL', '', $VERSION);
    if (substr($PACKAGE_NAME, -1, 1) == '.') {
        $PACKAGE_NAME = substr($PACKAGE_NAME, 0, -1);
    }
    $VERSION = str_replace('SERIAL', $HG_REVISION, $VERSION);
} else {
    $PACKAGE_NAME = 'wikirenderer-' . $VERSION;
}
if ($PACKAGE_TAR_GZ || $PACKAGE_ZIP) {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH) . $PACKAGE_NAME . '/';
} else {
    $BUILD_TARGET_PATH = jBuildUtils::normalizeDir($MAIN_TARGET_PATH);
开发者ID:amaury,项目名称:wikirenderer,代码行数:30,代码来源:build.php

示例4:

//... execution des manifests
jManifest::process('build/manifests/jelix-lib.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), true);
jManifest::process('build/manifests/jelix-www.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), true);
jManifest::$stripComment = false;
jManifest::process('build/manifests/jelix-vendors.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), true);
jManifest::process('build/manifests/jelix-scripts.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());
jManifest::process('build/manifests/jelix-modules.mn', '.', $BUILD_TARGET_PATH, ENV::getAll(), true);
jManifest::process('build/manifests/jelix-admin-modules.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());
if ($INCLUDE_ALL_FONTS) {
    jManifest::process('build/manifests/fonts.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());
}
if ($ENABLE_PHP_JELIX && ($PACKAGE_TAR_GZ || $PACKAGE_ZIP)) {
    jManifest::process('build/manifests/jelix-ext-php.mn', '.', $BUILD_TARGET_PATH, ENV::getAll());
}
// jtpl standalone for wizard
Env::setFromFile('JTPL_VERSION', 'lib/jelix/tpl/VERSION', true);
if ($IS_NIGHTLY) {
    $JTPL_VERSION = str_replace('SERIAL', $SOURCE_REVISION, $JTPL_VERSION);
}
$var = ENV::getAll();
$var['JTPL_STANDALONE'] = true;
$jtplpath = $BUILD_TARGET_PATH . 'lib/installwizard/jtpl/';
jBuildUtils::createDir($jtplpath);
jManifest::process('build/manifests/jtpl-standalone.mn', '.', $jtplpath, $var);
file_put_contents($jtplpath . '/VERSION', $JTPL_VERSION);
// the standalone checker
$var = ENV::getAll();
$var['STANDALONE_CHECKER'] = true;
jManifest::process('build/manifests/jelix-checker.mn', '.', $BUILD_TARGET_PATH, $var);
file_put_contents($BUILD_TARGET_PATH . 'lib/jelix/VERSION', $LIB_VERSION);
// creation du fichier d'infos sur le build
开发者ID:hadrienl,项目名称:jelix,代码行数:31,代码来源:buildjelix.php


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