本文整理汇总了PHP中Minify_Logger::log方法的典型用法代码示例。如果您正苦于以下问题:PHP Minify_Logger::log方法的具体用法?PHP Minify_Logger::log怎么用?PHP Minify_Logger::log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Minify_Logger
的用法示例。
在下文中一共展示了Minify_Logger::log方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: log
/**
* Send message to the Minify logger
*
* @param string $msg
*
* @return null
*/
public function log($msg)
{
Minify_Logger::log($msg);
}
示例2: setDocRoot
/**
* On IIS, create $_SERVER['DOCUMENT_ROOT']
*
* @param bool $unsetPathInfo (default false) if true, $_SERVER['PATH_INFO']
* will be unset (it is inconsistent with Apache's setting)
*
* @return null
*/
public static function setDocRoot($unsetPathInfo = false)
{
if (isset($_SERVER['SERVER_SOFTWARE'])
&& 0 === strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/')
) {
$_SERVER['DOCUMENT_ROOT'] = rtrim(substr(
$_SERVER['PATH_TRANSLATED']
,0
,strlen($_SERVER['PATH_TRANSLATED']) - strlen($_SERVER['SCRIPT_NAME'])
), '\\');
if ($unsetPathInfo) {
unset($_SERVER['PATH_INFO']);
}
require_once 'Minify/Logger.php';
Minify_Logger::log("setDocRoot() set DOCUMENT_ROOT to \"{$_SERVER['DOCUMENT_ROOT']}\"");
}
}
示例3: _log
/**
* Send message to the Minify logger
* @param string $msg
* @return null
*/
protected function _log($msg)
{
require_once 'Minify/Logger.php';
Minify_Logger::log($msg);
}
示例4: log
/**
* Send message to the Minify logger
* @param string $msg
* @return null
*/
public function log($msg)
{
//require _once MINIFY_MIN_DIR . '/Minify/Logger.php';
Minify_Logger::log($msg);
}
示例5: log
/**
* Send message to the Minify logger
* @param string $msg
* @return null
*/
protected function log($msg)
{
w3_require_once(W3TC_LIB_MINIFY_DIR . '/Minify/Logger.php');
Minify_Logger::log($msg);
}
示例6: _log
/**
* Send message to the Minify logger
* @param string $msg
* @return null
*/
protected function _log($msg)
{
Minify_Logger::log($msg);
}
示例7: log
/**
* Send message to the Minify logger
*
* @param string $msg
*
* @return null
*/
public function log($msg)
{
require_once 'Minify/Logger.php';
Minify_Logger::log($msg);
}
示例8: analyzeSources
/**
* Analyze sources (if there are any) and set $options 'contentType'
* and 'lastModifiedTime' if they already aren't.
*
* @param array $options options for Minify
*
* @return array options for Minify
*/
protected function analyzeSources($options = array())
{
if (!$this->sources) {
return $options;
}
$type = null;
foreach ($this->sources as $source) {
$sourceType = $source->getContentType();
if (!empty($options['contentType'])) {
// just verify sources have null content type or match the options
if ($sourceType !== null && $sourceType !== $options['contentType']) {
// TODO better logging
Minify_Logger::log('ContentType mismatch');
$this->sources = array();
return $options;
}
continue;
}
if ($type === null) {
$type = $sourceType;
} elseif ($sourceType !== $type) {
// TODO better logging
Minify_Logger::log('ContentType mismatch');
$this->sources = array();
return $options;
}
}
if (empty($options['contentType'])) {
if (null === $type) {
$type = 'text/plain';
}
$options['contentType'] = $type;
}
// last modified is needed for caching, even if setExpires is set
if (!isset($options['lastModifiedTime'])) {
$max = 0;
foreach ($this->sources as $source) {
$max = max($source->getLastModified(), $max);
}
$options['lastModifiedTime'] = $max;
}
return $options;
}
示例9: setDocRoot
/**
* On IIS, create $_SERVER['DOCUMENT_ROOT']
*
* @param bool $unsetPathInfo (default false) if true, $_SERVER['PATH_INFO']
* will be unset (it is inconsistent with Apache's setting)
*
* @return null
*/
public static function setDocRoot($unsetPathInfo = false)
{
if (isset($_SERVER['SERVER_SOFTWARE']) && 0 === strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS/')) {
$_SERVER['PATH_TRANSLATED'] = preg_replace('~[/\\\\]+~', '/', $_SERVER['PATH_TRANSLATED']);
$_SERVER['DOCUMENT_ROOT'] = rtrim(substr($_SERVER['PATH_TRANSLATED'], 0, strlen($_SERVER['PATH_TRANSLATED']) - strlen($_SERVER['SCRIPT_NAME'])), '\\');
if ($unsetPathInfo) {
unset($_SERVER['PATH_INFO']);
}
w3_require_once(W3TC_LIB_MINIFY_DIR . '/Minify/Logger.php');
Minify_Logger::log("setDocRoot() set DOCUMENT_ROOT to \"{$_SERVER['DOCUMENT_ROOT']}\"");
}
}