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


PHP APP::getInstance方法代码示例

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


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

示例1: recipe

 public function recipe()
 {
     $recettes = App::getInstance()->getTable('recette')->show($_GET['id']);
     $categories = App::getInstance()->getTable('categorie')->show($_GET['id']);
     $ingredients = App::getInstance()->getTable('ingredient')->show($_GET['id']);
     $instructions = APP::getInstance()->getTable('recette')->expl($recettes);
     $this->render('posts.recipe', compact('recettes', 'categories', 'ingredients', 'instructions', 'progress'));
 }
开发者ID:chouretr,项目名称:marmiton,代码行数:8,代码来源:PostsController.php

示例2: __construct

 /**
  * Init connexion pgsql
  * @throws Exception
  */
 public function __construct()
 {
     try {
         $this->config = APP::getInstance()->config['database'];
         $dsn = "pgsql:host=" . $this->config['server'] . " dbname=" . $this->config['dbname'] . " user=" . $this->config['username'] . " password=" . $this->config['password'];
         $this->connexion = new PDO($dsn, $this->config['username'], $this->config['password']);
     } catch (PDOException $e) {
         throw new Exception($e->getMessage());
     }
 }
开发者ID:oliviervanre,项目名称:GeolocOptinAdhoc,代码行数:14,代码来源:Database.php

示例3: init

 /**
  * When an application is loaded on the frontend,
  * load the language files from the app folder too
  *
  * @param  AppEvent 	$event The event triggered
  */
 public static function init($event)
 {
     $account = $event->getSubject();
     $app = APP::getInstance('zoo');
     $new = $event['new'];
     if (is_string($account->params) || is_null($account->params)) {
         // decorate data as this
         $account->params = $app->parameter->create($account->params);
     }
     if (is_string($account->elements) || is_null($account->elements)) {
         // decorate data as this
         $account->elements = $app->parameter->create($account->elements);
     }
     $account->loadMappedAccounts();
 }
开发者ID:camigreen,项目名称:ttop,代码行数:21,代码来源:account.php

示例4:

		if(data && ("success" in data) && data.success == true) {
			  var content = $( data.data );
			  $( "#res_sms" ).empty().append( content );
		} else {
			var content = $( data.error );
			  $( "#res_sms" ).empty().append( content );
		}
	});
}
</script>
	</div>



			<div class="sidebar-pane" id="messages"><h1>Nous contacter</h1><a href="mailto:<?php 
print APP::getInstance()->config['mail'];
?>
?subject=Contact+gendloc">PGHM ISERE - GENDLOC</a></div>
		</div>
	</div>

	<!-- LA CARTE -->
    <div id="map" class="sidebar-map"></div>


	<script type="text/javascript">
	// Carte Open OpenStreetMap_Mapnik
	var OpenStreetMap_Mapnik = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
	attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
	});
开发者ID:oliviervanre,项目名称:GeolocOptinAdhoc,代码行数:30,代码来源:APIE.php

示例5: array

 // $code = User::get('code');
 $val = $this->waitParam('get', 'val', array(Request::PARAM_NOT_NULL, Request::PARAM_TYPE_INTEGER));
 $tel = $this->waitParam('get', 'tel', array(Request::PARAM_NOT_NULL, Request::PARAM_TYPE_TPH));
 $DB = new Database();
 $lastid = $DB->addSmsLock($unite, $msg, $lang, $tel, $val);
 $urlSMS = APP::getInstance()->config['url'];
 //génération texte suivant msg langue et code
 $sender = "GENDLOC";
 if ($msg == "Geoloc") {
     $text = "* Vérifier GPS et DATA à ON\r\n* Cliquer le lien " . $urlSMS . "/pos?c=" . $lastid . "\r\n* Accepter le partage\r\n* Patienter\r\n" . $unite;
 } elseif ($msg == "Tracking") {
     $text = "* Vérifier GPS et DATA à ON\r\n* Cliquer le lien " . $urlSMS . "/trace?c=" . $lastid . "\r\n* Accepter le partage\r\n" . $unite;
 }
 //envoi SMS et récupération du hash d'envoi
 // require('/js/thecallR/src/ThecallrClient.php');
 $config = APP::getInstance()->config['thecallr'];
 $thecallrLogin = $config['login'];
 $thecallrPassword = $config['password'];
 $THECALLR = new ThecallrClient($thecallrLogin, $thecallrPassword);
 $settings = $config['settings'];
 $res = $THECALLR->send($config['order']['set'], array($settings));
 // Options
 $options = new stdClass();
 $options->flash_message = FALSE;
 // "sms.send" method execution
 $result = $THECALLR->call($config['order']['send'], $sender, $tel, $text, $options);
 // The method returns the SMS ID
 $nModif = $DB->setSmsSend($lastid, $result);
 if ($nModif != 1) {
     throw new Exception("l'envoi du sms a échoué");
 }
开发者ID:oliviervanre,项目名称:GeolocOptinAdhoc,代码行数:31,代码来源:envoi_sms.php

示例6: check

 function check()
 {
     /** @var usersModel */
     $model = APP::getInstance('UsersModel');
     # Tipo de conta
     if (!$model->getType($this->getType())) {
         throw new Exception('Tipo inválido.');
     }
     # E-mail
     if ($this->Email and !$this->getEmail()) {
         throw new Exception('E-mail inválido.');
     } else {
         if ($this->getEmail() and count($model->Lista('WHERE a.email = :email AND a.id != :id LIMIT 1', ['email' => $this->getEmail(), 'id' => $this->getId()]))) {
             throw new Exception('E-mail já está sendo utilizado por outro usuário.');
         }
     }
     # Login
     if (is_string($teste = VALIDAR::username($this->Login))) {
         throw new Exception(strip_tags($teste));
     }
     # Criptografando a senha
     if (strlen($this->Senha) != PASSWORD_LENG) {
         if (is_string($teste = VALIDAR::password($this->Senha))) {
             throw new Exception(strip_tags($teste));
         }
         $this->Senha = password($this->Senha);
     }
     return true;
 }
开发者ID:jhonlennon,项目名称:estrutura-mvc,代码行数:29,代码来源:UserVO.class.php

示例7: __construct

 public function __construct()
 {
     $this->ModelTypes = APP::getInstance('UsersTypesModel');
 }
开发者ID:jhonlennon,项目名称:estrutura-mvc,代码行数:4,代码来源:UsersModel.class.php

示例8: getInstanceController

 /**
  * Retorna uma instancia Controller
  * @param string $NameClass
  * @param string $Path
  * @return Controller
  */
 public static function getInstanceController($NameClass, $Path = null)
 {
     return APP::getInstance(strtolower(preg_replace('/Controller$/', null, $NameClass)) . 'Controller', $Path);
 }
开发者ID:jhonlennon,项目名称:estrutura-mvc,代码行数:10,代码来源:APP.class.php

示例9: array

                } else {
                    $renderer = 'nav';
                    $widget->nav_settings["accordion"] = true;
                }
            }
        }
    }
    $content = $this['menu']->process($widget, array('pre', 'subnav', $renderer, 'post'));
}
// Render widget
if (in_array($widget->position, array('breadcrumbs', 'logo', 'logo-small', 'search', 'fullscreen', 'top-image', 'bottom-image', 'debug')) || $widget->position == 'offcanvas' && $widget->menu) {
    echo $content;
} elseif ($widget->position == 'menu') {
    if ($widget->menu) {
        if ($widget->parameter->get('menutype') == 'account') {
            $zoo = APP::getInstance('zoo');
            $user = $zoo->storeuser->get();
            $account = $user->getAccount(true);
            $account_line = $zoo->store->merchantTestMode() ? '<div class="test-mode">' . $account->name . '<span>- Test Mode -</span></div>' : '<div>' . $account->name . '</div>';
            $content = str_replace('{user-name}', $user->name, $content);
            $content = $account ? str_replace('<div>{account-name}</div>', $account_line, $content) : $content;
            $content = str_replace('<ul class="uk-navbar-nav uk-hidden-small">', '<ul class="uk-navbar-nav uk-hidden-small uk-navbar-flip">', $content);
        }
        echo $content;
    } elseif ($widget->module == 'mod_zoocart') {
        echo $content;
    } else {
        echo '
			<ul class="uk-navbar-nav uk-hidden-small ' . $cart_class . '">
				<li class="uk-parent" data-uk-dropdown>
					<a href="#">' . $title . '</a>
开发者ID:camigreen,项目名称:ttop,代码行数:31,代码来源:widget.php

示例10: payment

 public static function payment()
 {
     $order = $event->getSubject();
     $app = APP::getInstance('zoo');
     echo 'Testing Email';
 }
开发者ID:camigreen,项目名称:ttop,代码行数:6,代码来源:notify.php


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