本文整理汇总了PHP中getMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP getMessage函数的具体用法?PHP getMessage怎么用?PHP getMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public static function run()
{
// INI AYARLAR YAPILANDIRILIYOR...
$iniSet = Config::get('Ini', 'settings');
if (!empty($iniSet)) {
Config::iniSet($iniSet);
}
// ----------------------------------------------------------------------
// HTACCESS DOSYASI OLUŞTURULUYOR...
if (Config::get('Htaccess', 'createFile') === true) {
createHtaccessFile();
}
// ----------------------------------------------------------------------
// COMPOSER DOSYASI OLUŞTURULUYOR...
$composer = Config::get('Composer', 'autoload');
if ($composer === true) {
$path = 'vendor/autoload.php';
if (file_exists($path)) {
require_once $path;
} else {
report('Error', getMessage('Error', 'fileNotFound', $path), 'AutoloadComposer');
die(getErrorMessage('Error', 'fileNotFound', $path));
}
} elseif (file_exists($composer)) {
require_once $composer;
} elseif (!empty($composer)) {
report('Error', getMessage('Error', 'fileNotFound', $composer), 'AutoloadComposer');
die(getErrorMessage('Error', 'fileNotFound', $composer));
}
// ----------------------------------------------------------------------
}
示例2: page_list
/** List All Page
*
* @param string Page slug
*/
function page_list()
{
$data['PageTitle'] = "Page";
$data['listPage'] = $this->mpage->getAllPage();
$data['message'] = getMessage($this->uri->segment(4));
$this->load->admin_template('admin/page_list', $data);
}
示例3: liga
/**
* Função para ligar uma variável a um valor
* @param string $campo
* @param string $valor
* @param string $tipo (STRING = DEFAULT, NULL, INT, STRING, BLOB)
* param CONSTANTES $tipo
* Tipos constantes:
* Os tipos são:
* "BOOLEAN" -> PDO::PARAM_BOOL (integer)
* Representa um tipo de dados booleano.
* "NULL" -> PDO::PARAM_NULL (integer)
* Representa um tipo de dados nulo.
* "INT" -> PDO::PARAM_INT (integer)
* Representa o um tipo de dado inteiro
* "STRING -> PDO::PARAM_STR (integer)
* Representa o CHAR, VARCHAR, ou outros tipos de dados string.
* "BLOB" -> PDO::PARAM_LOB (integer)
* Representa o tipo de dado BLOB - Binary Large Objects
* param int Tamanho
*/
public function liga($campo, $valor, $tipo = "STRING")
{
/*
* Ajusto o tipo da variáveL
*/
switch (strtoupper($tipo)) {
case "BOOLEAN":
$tp = PDO::PARAM_BOOL;
break;
case "NULL":
$tp = PDO::PARAM_NULL;
break;
case "INT":
$tp = PDO::PARAM_INT;
break;
case "BLOB":
$tp = PDO::PARAM_LOB;
break;
default:
$tp = PDO::PARAM_STR;
break;
}
/* Tento ligar um valor ao parâmetro */
Depurar::reg("Parametro: {$campo} Tipo:{$tipo} Valor:{$valor}");
try {
$this->resultado->bindValue(":" . $campo, $valor, $tp);
//echo "liguei :{$campo} a {$valor}";
} catch (PDOException $e) {
die($e - getMessage());
}
}
示例4: save
public function save($resource)
{
try {
//se if its update or new
if ($resource->getId() == 0) {
//set all inputs
$this->db->set('name', $resource->getName());
$this->db->set('description', $resource->getDescription());
$this->db->set('created', time());
$this->db->insert('resources');
$affectedRows = $this->db->affected_rows();
if (is_null($affectedRows) or $affectedRows == 0) {
log_message('error', 'Resource_model::save - Could not create resource' . $resource->getName());
throw new Exception('Could not create resource!');
}
} else {
$this->db->where('id', $resource->getId());
$this->db->update('resources', $resource);
$affectedRows = $this->db->affected_rows();
if (is_null($affectedRows) or $affectedRows == 0) {
log_message('error', 'Resource_model::save - Could not update resource' . $resource->getName());
throw new Exception('Could not update resource!');
}
}
} catch (Exception $err) {
die($err - getMessage());
}
}
示例5: run
public function run($functionName = '', $functionRun = '')
{
$datas = Structure::datas();
$parameters = $datas['parameters'];
$isFile = $datas['isFile'];
$function = $datas['function'];
if (file_exists($isFile)) {
if ($functionName === $function) {
if (is_callable($functionRun)) {
if (APP_TYPE === 'local') {
set_error_handler('Exceptions::table');
}
call_user_func_array($functionRun, $parameters);
if (APP_TYPE === 'local') {
restore_error_handler();
}
} else {
// Sayfa bilgisine erişilemezse hata bildir.
if (!Config::get('Route', 'show404')) {
// Hatayı ekrana yazdır.
echo Error::message('Error', 'callUserFuncArrayError', $functionRun);
// Hatayı rapor et.
report('Error', getMessage('Error', 'callUserFuncArrayError'), 'SystemCallUserFuncArrayError');
// Çalışmayı durdur.
return false;
} else {
redirect(Config::get('Route', 'show404'));
}
}
}
}
}
示例6: connect
public function connect($config = array())
{
$this->config = $config;
if (strstr($this->config['driver'], '->')) {
$subdrivers = explode('->', $this->config['driver']);
$this->select_driver = $subdrivers[1];
}
if (empty($this->select_driver)) {
$this->select_driver = 'mysql';
}
if (!in_array($this->select_driver, $this->pdo_subdrivers)) {
die(getMessage('Database', 'driverError', $this->select_driver));
}
$this->connect = $this->_sub_drivers($this->config['user'], $this->config['password']);
// Mysql için karakterseti sorguları
if ($this->select_driver === 'mysql') {
if (!empty($this->config['charset'])) {
$this->connect->exec("SET NAMES '" . $this->config['charset'] . "'");
}
if (!empty($this->config['charset'])) {
$this->connect->exec('SET CHARACTER SET ' . $this->config['charset']);
}
if (!empty($this->config['collation'])) {
$this->connect->exec("SET COLLATION_CONNECTION = '" . $this->config['collation'] . "'");
}
}
}
示例7: category_list
/** List All Category Article
*
* @param string Category slug
*/
public function category_list()
{
$data['title'] = "Admin Category List";
$data['listCategory'] = $this->mcatarticle->getAllCategories();
$data['message'] = getMessage($this->uri->segment(4));
$this->load->admin_template('admin/category_article_list', $data);
}
示例8: article_list
/** List All Article
*
* @param string Article slug
*/
function article_list()
{
$data['PageTitle'] = "Article";
$data['listArticle'] = $this->marticle->getAllArticle();
$data['categories'] = $this->mcatarticle->getAllCategories();
$data['message'] = getMessage($this->uri->segment(4));
$this->load->admin_template('admin/article_list', $data);
}
示例9: getUserLink
/**
* adds the link for the connect param
* @since 1.7.3
* @param $user pass-by-reference
* @return void
*/
private function getUserLink(&$user)
{
$username = KunenaFactory::getUser($user['userid'])->getName();
if ($user['leapcorrection'] == $this->timeo->format('z', true) + 1) {
$subject = getSubject($username);
$db = JFactory::getDBO();
$query = "SELECT id,catid,subject,time as year FROM #__kunena_messages WHERE subject='{$subject}'";
$db->setQuery($query, 0, 1);
$post = $db->loadAssoc();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
$catid = $this->params->get('bcatid');
$postyear = new JDate($post['year'], $this->soffset);
if (empty($post) && !empty($catid) || !empty($post) && !empty($catid) && $postyear->format('Y', true) < $this->timeo->format('Y', true)) {
$botname = $this->params->get('swkbbotname', JText::_('SW_KBIRTHDAY_FORUMPOST_BOTNAME_DEF'));
$botid = $this->params->get('swkbotid');
$time = CKunenaTimeformat::internalTime();
//Insert the birthday thread into DB
$query = "INSERT INTO #__kunena_messages (catid,name,userid,email,subject,time, ip)\n\t\t \t\tVALUES({$catid},'{$botname}',{$botid}, '','{$subject}', {$time}, '')";
$db->setQuery($query);
$db->query();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
//What ID get our thread?
$messid = (int) $db->insertID();
//Insert the thread message into DB
$message = getMessage($username);
$query = "INSERT INTO #__kunena_messages_text (mesid,message)\n VALUES({$messid},'{$message}')";
$db->setQuery($query);
$db->query();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
//We know the thread ID so we can update the parent thread id with it's own ID because we know it's
//the first post
$query = "UPDATE #__kunena_messages SET thread={$messid} WHERE id={$messid}";
$db->setQuery($query);
$db->query();
if ($db->getErrorMsg()) {
KunenaError::checkDatabaseError();
}
// now increase the #s in categories
CKunenaTools::modifyCategoryStats($messid, 0, $time, $catid);
$user['link'] = CKunenaLink::GetViewLink('view', $messid, $catid, '', $username);
$uri = JFactory::getURI();
if ($uri->getVar('option') == 'com_kunena') {
$app =& JFactory::getApplication();
$app->redirect($uri->toString());
}
} elseif (!empty($post)) {
$user['link'] = CKunenaLink::GetViewLink('view', $post['id'], $post['catid'], '', $username);
}
} else {
$user['link'] = CKunenaLink::GetProfileLink($user['userid']);
}
}
示例10: motivateUser
function motivateUser($user, $activity)
{
//TODO: add more messages!
$message = getMessage($user, $activity);
//Send Push
sendPush($message, $user->pushToken);
//Log
logMotivation($user, $activity, $message);
}
示例11: sendMail
function sendMail($email, $subject, $msg)
{
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
$header = "From: no-reply@nacossunn.org\r\n" . "Content-type: text/html\r\n" . "X-Mailer: PHP/" . phpversion();
return mail($email, $subject, wordwrap(getMessage($msg), 70), $header);
} else {
return false;
}
}
示例12: connect
public function connect($http_host = HTTP_HOST, $user = DB_USER, $user_password = DB_PASSWORD, $db_host = DB_HOST)
{
try {
$this->_objPDO = new PDO($db_host . ':host=' . $http_host, $user, $user_password, $this->_pdoOption);
} catch (PDOException $e) {
new DExceptions($e - getMessage(), $e->getCode());
}
return $this->_objPDO;
}
示例13: checkRequestOrder
protected function checkRequestOrder()
{
$order = ini_get('request_order');
if (!$order || !in_array($order, array('GP', 'PG'), true)) {
$this->addUnformattedDetailError('SECURITY_SITE_CHECKER_PHP_REQUEST_ORDER', CSecurityCriticalLevel::MIDDLE, getMessage('SECURITY_SITE_CHECKER_PHP_REQUEST_ORDER_ADDITIONAL', array('#CURRENT#' => $order, '#RECOMMENDED#' => 'GP')));
return self::STATUS_FAILED;
}
return self::STATUS_PASSED;
}
示例14: get_plural_messages
function get_plural_messages($prefix)
{
global $MESS;
$result = array();
$k = 0;
while ($form = getMessage($prefix . 'PLURAL_' . ++$k)) {
$result[] = $form;
}
return $result;
}
示例15: __construct
function __construct($serverURL = 'localhost:9000', $serverPath = '/')
{
$this->serverURL = $serverURL;
$this->serverPath = $serverPath;
try {
$this->client = new XML_RPC_Client($this->serverPath, $this->serverURL);
} catch (Exception $e) {
echo "<h4>Error creating XMLRPC client: " . $e . getMessage() . "</h4>";
exit;
}
}