本文整理汇总了PHP中messages::logSystem方法的典型用法代码示例。如果您正苦于以下问题:PHP messages::logSystem方法的具体用法?PHP messages::logSystem怎么用?PHP messages::logSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类messages
的用法示例。
在下文中一共展示了messages::logSystem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process()
{
if (!parent::process()) {
$this->redirectNoSession();
}
$file = new \model\file();
if (!unlink(\base_config::$updateCache)) {
\messages::logSystem('Unable to clear cache!');
\messages::registerError(\language::returnLanguageConstant('CACHE_CLEARED_FAILED'));
} else {
\messages::registerMessage(\language::returnLanguageConstant('CACHE_CLEARED_OK'));
}
\messages::showMessages();
die;
}
示例2: returnLanguageConstant
/**
* Gibt Inhalt von Language-String zurück
* @param string $constName
* @param array $replaceArray
* @return string
*/
public static function returnLanguageConstant($constName, $replaceArray = null, $isNotUtf8 = false)
{
if (!isset(self::$languageData[$constName])) {
self::$languageData[$constName] = "{$constName} NOTFOUND!";
messages::logSystem("language const {$constName} not found!");
}
$constText = self::$languageData[$constName];
if (!is_null($replaceArray)) {
$constText = self::replaceLanguageConstant($constText, $replaceArray);
}
if ($isNotUtf8) {
$constText = utf8_decode($constText);
}
return $constText;
}
示例3: query
/**
* Führt SQL-Query Befehl auf DB aus
* @param string $query
* @param array $params
* @return boolean
*/
public function query($query, $params = null)
{
if (defined('SQL_DEBUG')) {
messages::logSystem($query);
}
$statement = $this->prepare($query);
if (!$statement->execute($params)) {
$this->logError();
return false;
}
return $statement->fetchAll(PDO::FETCH_ASSOC);
}
示例4: unzipPackage
public function unzipPackage($fileName, &$fileList = array())
{
$fileName = \base_config::$updateFolder . $fileName;
$zip = new \ZipArchive();
$res = $zip->open($fileName);
if ($res !== TRUE) {
\messages::logSystem($res);
\messages::registerError(\language::returnLanguageConstant('UNPACK_PCK_FAILED'), false);
return false;
}
for ($i = 0; $i < $zip->numFiles; $i++) {
$zipFileName = \base_config::$baseDir . $zip->getNameIndex($i);
if (file_exists($zipFileName) && !is_writable($zipFileName)) {
chmod($zipFileName, 0777);
}
$fileCheck = $zip->getNameIndex($i);
if (file_exists($zipFileName)) {
$fileCheck = is_writable($zipFileName) ? true : false;
} else {
$fileCheck = true;
}
$fileList[$zipFileName] = $fileCheck;
}
if ($zip->extractTo(\base_config::$updateFolder)) {
\messages::logSystem('Extract package file ' . $fileName . ' >> OK!');
\messages::registerMessage(\language::returnLanguageConstant('UNPACK_PCK_SUCCESS'), false);
}
$zip->close();
return true;
}