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


PHP Manager::all方法代码示例

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


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

示例1: dashboard

 public function dashboard()
 {
     $manager = Manager::all();
     $avg = array();
     foreach ($manager as $key => $man) {
         $avg[$key] = DB::select('SELECT AVG(percentage) as avg FROM (SELECT (SUM(t.access)/(count(*))*100) as percentage, a.id as aid,t.tool_name, a.manager_id as mid,a.account_name as aname,m.manager as Manager FROM accounts a JOIN managers m ON(m.id = a.manager_id) JOIN tools t ON(t.acc_id = a.id)  where m.id = ' . $manager[$key]->id . ' group by (t.acc_id)) as mavg');
     }
     $colors = array('0' => 'primary', '1' => 'red', '2' => 'green', '3' => 'yellow');
     return View::make('admin._main', compact('manager', 'colors', 'avg'));
 }
开发者ID:avinash-,项目名称:idtv2,代码行数:10,代码来源:HomeController.php

示例2: intercept

 public static function intercept($path, $type = 'file', $debug = false)
 {
     $modules = Manager::all();
     foreach ($modules as $module) {
         $m_path = $module->path();
         if (false !== strpos($path, ptc_path('root') . '/app/config')) {
             continue;
             // do nothing
         } else {
             if (false !== strpos($path, ptc_path('root') . '/app') && false === strpos($path, $m_path)) {
                 $file = str_replace(ptc_path('root') . '/app', $m_path, $path);
                 if ('realpath' === $type && ($f = realpath($file))) {
                     $path = $f;
                     break;
                     // load the first file found
                 } else {
                     if ('file' === $type && file_exists($file)) {
                         if ($debug) {
                             ptc_log([$file, $path], 'StreamWrapper intercepted module file!', 'StreamWrapper Config');
                         }
                         $path = $file;
                         break;
                         // load the first file found
                     }
                 }
             }
         }
     }
     return $path;
 }
开发者ID:ifsale,项目名称:fluidphp-framework,代码行数:30,代码来源:StreamWrapper.php

示例3: session

 protected function session()
 {
     $session = Registry::get("session");
     $managers = Manager::all(array("user_id = ?" => $this->user->id));
     if ($managers) {
         $session->set("managing", $managers);
         $this->redirect("/admin");
     }
     $member = Member::first(array("user_id = ?" => $this->user->id));
     $doc = Doc::first(array("user_id = ?" => $this->user->id));
     if ($member && !$doc) {
         $organization = Organization::first(array("id = ?" => $member->organization_id));
         $session->set("member", $member);
         $session->set("organization", $organization);
         $this->redirect("/vendor");
     }
     if ($doc && $member) {
         $organization = Organization::first(array("id = ?" => $member->organization_id));
         $session->set("member", $member);
         $session->set("organization", $organization);
         $session->set("doctor", $doc);
         $this->redirect("/doctor");
     }
     $checkout = isset($_COOKIE["__hlCheckout"]) ? true : false;
     if ($checkout) {
         setcookie("__hlCheckout", "", time() - 3600);
         $this->redirect("/cart/checkout");
     }
     $this->redirect("/patient.html");
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:30,代码来源:auth.php


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