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


PHP APP类代码示例

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


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

示例1: find_customer

 public function find_customer($id = null)
 {
    APP::import('Model','Customer');
     $this->Customer   =   new Customer();
     $cus = $this->Customer->find('first',array('conditions'=>array('Customer.id'=>$id)));
     return $cus['Customer']['customername'].'('.$cus['Customer']['tag_name'].')';
 }
开发者ID:ArunPrasaath,项目名称:bs,代码行数:7,代码来源:DeliveryHelper.php

示例2: checktag_list

 public function checktag_list($group_id=NULL)
 {
     APP::import('Model','Customer');
     $this->Customer  =   new Customer();
     $group_data  =    $this->Customer->find('all',array('conditions'=>array('Customer.customergroup_id'=>$group_id,'Customer.status'=>1)));
     return count($group_data);
 }
开发者ID:ArunPrasaath,项目名称:bs,代码行数:7,代码来源:CustomerHelper.php

示例3: getInstance

 /**
  * Get singleton
  * @return APP
  */
 public static function getInstance()
 {
     if (self::$_instance == null) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
开发者ID:oliviervanre,项目名称:GeolocOptinAdhoc,代码行数:11,代码来源:APP.php

示例4: getCountFolder

 /**
  * count shop in folder
  * 
  */
 public function getCountFolder($shop_id)
 {
     APP::import("Model", array("FolderShop"));
     $this->FolderShop = new FolderShop();
     $data = $this->FolderShop->find("count", array("conditions" => array("FolderShop.shop_id" => $shop_id)));
     return $data;
 }
开发者ID:Quang2727,项目名称:Kaopass,代码行数:11,代码来源:Shop.php

示例5: dashboard_customer_name

	public function dashboard_customer_name($module = NULL ,$value = NULL ,$chk_fld = NULL ,$get_fld = NULL )
    {
        APP::import('Model',$module);
        $this->$module   =   new $module();
        $result = $this->$module->find('first',array('conditions'=>array($module.'.'.$chk_fld=>$value)));
        if(!empty($result[$module][$get_fld])) return $result[$module][$get_fld];
    }
开发者ID:ArunPrasaath,项目名称:bs,代码行数:7,代码来源:AppHelper.php

示例6: run

 /**
  * 框架主方法 !!!
  *
  * @return boolean
  */
 public static function run()
 {
     $controller = ForceStringFrom('c');
     //注意POST或GET中c和a变量名称被占用
     $action = ForceStringFrom('a');
     $controller = Iif($controller, $controller, self::$defaultController);
     $action = Iif($action, $action, self::$defaultAction);
     $app_file = "./controllers/" . $controller . ".php";
     if (!is_file($app_file)) {
         self::debug("file[{$app_file}] does not exists.");
         return false;
     } else {
         require_once realpath($app_file);
     }
     $classname = 'c_' . $controller;
     if (!class_exists($classname, false)) {
         self::debug("class[{$classname}] does not exists.");
         return false;
     }
     $path[0] = $controller;
     $path[1] = $action;
     self::$C = new $classname($path);
     //实例化控件类, 设置为APP当前的控件对像
     if (!method_exists(self::$C, $action)) {
         self::debug("method[{$action}] does not exists in class[{$classname}].");
         return false;
     }
     return call_user_func(array(&self::$C, $action), $path);
 }
开发者ID:noikiy,项目名称:meilala,代码行数:34,代码来源:APP.php

示例7: _getDbConnectInfo

 /**
  * データベースの接続先情報を取得する
  * 
  * @access private
  * @author sakuragawa
  */
 private function _getDbConnectInfo()
 {
     $dbConfigInfo = array();
     $dbConfig = new DATABASE_CONFIG();
     // 読み込まれているModel分ループ
     foreach ($this->controller->modelNames as $key => $val) {
         APP::import('Model', $this->controller->modelNames[$key]);
         $model = new $this->controller->modelNames[$key]();
         $useDbConfig = $model->useDbConfig;
         if (!isset($dbConfig->{$useDbConfig})) {
             // 定義されてない
             unset($model);
             continue;
         }
         // 接続設定
         $one = $dbConfig->{$useDbConfig};
         // 必要な分のみ取り出し
         $buf['driver'] = $one['driver'];
         $buf['host'] = $one['host'];
         $buf['database'] = $one['database'];
         if (count($dbConfigInfo) != 0) {
             // 初回以外
             if (!in_array($buf, $dbConfigInfo)) {
                 $dbConfigInfo[$useDbConfig] = $buf;
             }
         } else {
             // 初回
             $dbConfigInfo[$useDbConfig] = $buf;
         }
         unset($model);
     }
     return $dbConfigInfo;
 }
开发者ID:kozo,项目名称:debug_kit_database_connection,代码行数:39,代码来源:database_connection_panel.php

示例8: rankFolder

 /**
  * add shop to folder
  * 
  */
 public function rankFolder($conditions, $user_id)
 {
     APP::import("Model", array("User"));
     $this->User = new User();
     $user = $this->User->findById($user_id);
     $folder = $this->find('list', array('conditions' => $conditions, "group by" => "Folder.id", "order" => "FolderUser.modified DESC", 'fields' => array('FolderUser.id', 'FolderUser.id')));
     $rank_folder = array();
     if (!empty($folder)) {
         if (empty($user["User"]["rank_folder"])) {
             $rank_folder = $folder;
         } else {
             $list = explode(",", $user["User"]["rank_folder"]);
             $listRank = array();
             foreach ($list as $val) {
                 if (!empty($folder[$val])) {
                     $listRank[] = $val;
                 }
             }
             $rank_folder = array_merge($listRank, $folder);
             $rank_folder = array_unique($rank_folder);
         }
         $user["User"]["rank_folder"] = implode(",", $rank_folder);
         $this->User->save($user);
     }
     return $rank_folder;
 }
开发者ID:Quang2727,项目名称:Kaopass,代码行数:30,代码来源:FolderUser.php

示例9: getlog_approve_sales

 public function getlog_approve_sales($salesorder_id=NULL)
 {
     APP::import('Model','Logactivity');
     $this->Logactivity  =   new Logactivity();
     $log_list    =    $this->Logactivity->find('first',array('conditions'=>array('Logactivity.logid'=>$salesorder_id)));
     return $log_list['User']['username'];
 }
开发者ID:ArunPrasaath,项目名称:bs,代码行数:7,代码来源:LogHelper.php

示例10: __construct

 /**
  * Inicia uma sessão
  * @param string $sessionName
  */
 public function __construct($sessionName, $ProtectedModule = false)
 {
     self::start();
     $this->SessionName = ($ProtectedModule ? (is_string($ProtectedModule) ? $ProtectedModule : APP::getCurrentModule()) . '-' : null) . $sessionName;
     if (!isset($_SESSION[self::$_SESSION_][$this->SessionName])) {
         $_SESSION[self::$_SESSION_][$this->SessionName] = null;
     }
 }
开发者ID:jhonlennon,项目名称:estrutura-mvc,代码行数:12,代码来源:Session.class.php

示例11: NewAnnex

 function NewAnnex()
 {
     APP::import('Model', 'Annex');
     $this->Annex = new Annex();
     $this->Annex->create();
     $this->Annex->save();
     return $this->Annex->getLastInsertID();
 }
开发者ID:tjabdoullah,项目名称:cakephp-ready,代码行数:8,代码来源:AnnexesHelper.php

示例12: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     xAC::setApiKey(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_APIKEY'));
     xAC::setApiBaseUrl(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_URL'));
     xAC::setApiVersion(Config::get('arrowsphere-client.' . APP::environment() . '.XAC_APIVERSION'));
     xAC::initServices(true);
     return printf("Services list has been refreshed \n");
 }
开发者ID:ArrowSphere,项目名称:Laravel-Client,代码行数:13,代码来源:refreshListCommand.php

示例13: 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

示例14: __construct

 public function __construct()
 {
     $this->_options['ci'] = $this->ci =& get_instance();
     $this->theme = APP::get_namespace_id() == 'admin' ? false : true;
     if (APP_DIR && is_dir(FCPATH . 'plugins/' . APP_DIR . '/') && $this->ci->controller == 'admin') {
         // 表示插件的后台
         $this->theme = false;
     }
 }
开发者ID:rainbow88,项目名称:hummel,代码行数:9,代码来源:View.php

示例15: get_customer_name

 public function get_customer_name($customer_id=NULL)
 {
     APP::import('Model','Clientpo');
     $this->Customer  =   new Customer();
     $customer    =    $this->Customer->find('first',array('conditions'=>array('Customer.id'=>$customer_id),'fields'=>array('Customertagname')));
     if(!empty($customer)):
            return  $customer['Customer']['Customertagname'];
         endif;
 }
开发者ID:ArunPrasaath,项目名称:bs,代码行数:9,代码来源:ClientPOHelper.php


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