• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP APP类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: dataset

 public function dataset()
 {
     $req = APP::request();
     $get = $req->get();
     $search = ZiUtil::is_set('search', $get);
     $query = "nama ILIKE '%" . $search . "%'";
     $results = ZiUtil::search_result_jq_DB($query, $get, 'Principal');
     return ZiUtil::dataset_json($results['query'], $results['total']);
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:9,代码来源:Principal.php


示例17: Add

 public function Add($userId, $text)
 {
     APP::import('Model', 'Log');
     $this->Log = new Log();
     $this->Log->create();
     $this->Log->set('user_id', $userId);
     $this->Log->set('message', $text);
     $this->Log->save();
 }
开发者ID:tjabdoullah,项目名称:cakephp-ready,代码行数:9,代码来源:LogsHelper.php


示例18: dataset

 public function dataset()
 {
     $req = APP::request();
     $params = $req->get();
     $search = ZiUtil::is_set('search', $params);
     $query = "uom_nama ILIKE '%" . $search . "%'";
     $results = ZiUtil::search_result_jq_DB($query, $params, 'UOM');
     return ZiUtil::dataset_json($results['query'], $results['total']);
 }
开发者ID:suryakencana,项目名称:tekkadan,代码行数:9,代码来源:UnitOM.php


示例19: __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


示例20: blacklistCheck

 public function blacklistCheck($data)
 {
     $site_url = strtolower($data['site_url']);
     //get restricted list from db
     APP::import("Model", "RestrictedName");
     $this->RestrictedName = new RestrictedName();
     if (!$this->RestrictedName->checkName($site_url)) {
         return false;
     }
     return true;
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:11,代码来源:PresenterSite.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AQ_Block类代码示例发布时间:2022-05-23
下一篇:
PHP API类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap