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


PHP View::view方法代码示例

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


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

示例1: get_wifi_data

 /**
  * Get WiFi information for serial_number
  *
  * @param string $serial serial number
  **/
 public function get_wifi_data($serial_number = '')
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
     }
     $wifi = new wifi_model($serial_number);
     $obj->view('json', array('msg' => $wifi->rs));
 }
开发者ID:squarit,项目名称:munkireport-php,代码行数:14,代码来源:wifi_controller.php

示例2: View

 /**
  * Retrieve data in json format
  *
  * @return void
  * @author 
  **/
 function get_data($serial_number = '')
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
     }
     $service = new Service_model();
     $obj->view('json', array('msg' => $service->retrieve_records($serial_number)));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:15,代码来源:service_controller.php

示例3: View

 /**
  * Retrieve data in json format
  *
  **/
 function get_data($serial_number = '')
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
     }
     $ard = new Ard_model($serial_number);
     $obj->view('json', array('msg' => $ard->rs));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:13,代码来源:ard_controller.php

示例4: get_low

 /**
  * Get low battery devices
  *
  *
  **/
 public function get_low()
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
     }
     $bt = new Bluetooth_model();
     $obj->view('json', array('msg' => $bt->get_low()));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:14,代码来源:bluetooth_controller.php

示例5: View

 function get_map_data()
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
         return;
     }
     $location = new Location_model();
     $obj->view('json', array('msg' => $location->get_map_data()));
 }
开发者ID:squarit,项目名称:munkireport-php,代码行数:10,代码来源:location_controller.php

示例6: View

 /**
  * Get stats
  *
  **/
 function get_stats()
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
         return;
     }
     $cert = new Certificate_model();
     $obj->view('json', array('msg' => $cert->get_stats()));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:14,代码来源:certificate_controller.php

示例7: get_printers

 /**
  * Get printer information for printer widget
  *
  * @return void
  * @author John Eberle (tuxudo)
  **/
 public function get_printers()
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => array('error' => 'Not authenticated')));
         return;
     }
     $printers = new Printer_model();
     $obj->view('json', array('msg' => $printers->get_printers()));
 }
开发者ID:squarit,项目名称:munkireport-php,代码行数:16,代码来源:printer_controller.php

示例8: get_modified_computernames

 /**
  * Get Modified Computer names
  *
  *
  **/
 public function get_modified_computernames()
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => array('error' => 'Not authenticated')));
         return;
     }
     $dm = new Directory_service_model();
     $obj->view('json', array('msg' => $dm->get_modified_computernames()));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:15,代码来源:directory_service_controller.php

示例9: get_count

 /**
  * Get count of  displays
  *
  *
  * @param int $type type 1 is external, type 0 is internal
  **/
 public function get_count($type = 1)
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => array('error' => 'Not authenticated')));
         return;
     }
     $dim = new Displays_info_model();
     $obj->view('json', array('msg' => $dim->get_count($type)));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:16,代码来源:displays_info_controller.php

示例10: View

 /**
  * Get timemachine stats
  *
  * @return void
  * @author 
  **/
 function get_stats($hours = 24)
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
         return;
     }
     $timemachine = new Timemachine_model();
     $obj->view('json', array('msg' => $timemachine->get_stats($hours)));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:16,代码来源:timemachine_controller.php

示例11: get_groups

 /**
  * Get statistics
  *
  * Get statistics grouped by type
  *
  * @param String type group by region_name or site_name
  **/
 public function get_groups($type = '')
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
         return;
     }
     $site_info = new Site_info_model();
     $obj->view('json', array('msg' => $site_info->get_groups($type)));
 }
开发者ID:bochoven,项目名称:MunkiReport_modules,代码行数:17,代码来源:site_info_controller.php

示例12: View

 /**
  * Retrieve data in json format
  *
  * @return void
  * @author 
  **/
 function get_data($serial_number = '')
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => 'Not authorized'));
     }
     $out = array();
     $model = new Crashplan_model();
     foreach ($model->retrieve_records($serial_number) as $record) {
         $out[] = $record->rs;
     }
     $obj->view('json', array('msg' => $out));
 }
开发者ID:pexner,项目名称:munkireport-php,代码行数:19,代码来源:crashplan_controller.php

示例13: View

 /**
  * Get statistics
  *
  * @return void
  * @author
  **/
 function get_stats($mount_point = '/')
 {
     $obj = new View();
     if (!$this->authorized()) {
         $obj->view('json', array('msg' => array('error' => 'Not authenticated')));
         return;
     }
     $disk_report = new Disk_report_model();
     $out = array();
     $thresholds = conf('disk_thresholds', array('danger' => 5, 'warning' => 10));
     $out['thresholds'] = $thresholds;
     $out['stats'] = $disk_report->get_stats($mount_point, $thresholds['danger'], $thresholds['warning']);
     $obj->view('json', array('msg' => $out));
 }
开发者ID:GarethMakgetla,项目名称:munkireport-php,代码行数:20,代码来源:disk_report_controller.php

示例14: init

 public static function init($viewtype, $config)
 {
     self::$view = new $viewtype();
     foreach ($config as $key => $value) {
         self::$view->{$key} = $value;
     }
 }
开发者ID:emiloffice,项目名称:mvc_instance,代码行数:7,代码来源:View.class.php

示例15: age

 /**
  * Generate age data for age widget
  *
  * @author AvB
  **/
 function age()
 {
     // Authenticate
     if (!$this->authorized()) {
         die('Authenticate first.');
         // Todo: return json?
     }
     $out = array();
     $warranty = new Warranty_model();
     // Time calculations differ between sql implementations
     switch ($warranty->get_driver()) {
         case 'sqlite':
             $agesql = "CAST(strftime('%Y.%m%d', 'now') - strftime('%Y.%m%d', purchase_date) AS INT)";
             break;
         case 'mysql':
             $agesql = "TIMESTAMPDIFF(YEAR,purchase_date,CURDATE())";
             break;
         default:
             // FIXME for other DB engines
             $agesql = "SUBSTR(purchase_date, 1, 4)";
     }
     $sql = "SELECT count(1) as count, \n\t\t\t\t{$agesql} AS age \n\t\t\t\tFROM warranty\n\t\t\t\tGROUP by age \n\t\t\t\tORDER BY age DESC";
     $cnt = 0;
     foreach ($warranty->query($sql) as $obj) {
         $obj->age = $obj->age ? $obj->age : '<1';
         $out[] = array('label' => $obj->age, 'data' => array(array(intval($obj->count), $cnt++)));
     }
     $obj = new View();
     $obj->view('json', array('msg' => $out));
 }
开发者ID:kidistS,项目名称:munkireport-php,代码行数:35,代码来源:warranty_controller.php


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