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


PHP Event::all方法代码示例

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


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

示例1: testAllRetrieve

 public function testAllRetrieve()
 {
     self::authorizeFromEnv();
     $events = Event::all(array('limit' => 3, 'offset' => 0));
     if (count($events['data'])) {
         $event = Event::retrieve($events['data'][0]->id);
         $this->assertSame($events['data'][0]->id, $event->id);
     }
 }
开发者ID:payjp,项目名称:payjp-php,代码行数:9,代码来源:EventTest.php

示例2: index

 public function index()
 {
     if ($this->getDates()) {
         $events = Event::where('start', '>=', $_GET['start'])->where('end', '<', $_GET['end'])->get();
         echo json_encode($events);
     } else {
         $events = Event::all();
         echo json_encode($events);
     }
 }
开发者ID:owency,项目名称:Owency,代码行数:10,代码来源:events.php

示例3: all

 /**
  * @before _secure
  */
 public function all()
 {
     $this->noview();
     $results = Event::all(array("organization_id = ?" => Registry::get("session")->get("organization")->id));
     $events = array();
     foreach ($results as $r) {
         $events[] = array("title" => $r->title, "start" => $this->returnTime($r->start), "end" => $this->returnTime($r->start), "allDay" => $r->allDay ? true : false, "id" => $r->id, "className" => "event");
     }
     echo json_encode($events);
 }
开发者ID:SwiftSchool,项目名称:School,代码行数:13,代码来源:events.php

示例4: view

 /**
  * view
  * Retrieves rows from database.
  */
 public function view()
 {
     $res = new Response();
     $res->success = true;
     $res->message = "Loaded data";
     if (isset($_REQUEST['startDate'])) {
         $_SESSION[$GLOBALS['app_id']]['startDate'] = $_REQUEST['startDate'];
         $_SESSION[$GLOBALS['app_id']]['endDate'] = $_REQUEST['endDate'];
         $res->data = Event::range($_REQUEST['startDate'], $_REQUEST['endDate']);
     } else {
         $res->data = Event::all();
     }
     return $res->to_json();
 }
开发者ID:nagyist,项目名称:tutus,代码行数:18,代码来源:events.php

示例5: view

 /**
  * view
  * Retrieves rows from database.
  */
 public function view()
 {
     $res = new Response();
     $res->success = true;
     $res->message = "Loaded data";
     //var_dump($this->request);
     if (isset($_REQUEST['start'])) {
         $this->startDate = $_REQUEST['start'];
         $this->endDate = $_REQUEST['end'];
         $res->data = Event::range($this->startDate, $this->endDate);
     } else {
         $res->data = Event::all();
     }
     return $res->to_json();
 }
开发者ID:zhuangyan,项目名称:lino,代码行数:19,代码来源:events.php

示例6: __construct

 public function __construct()
 {
     self::authorizeFromEnv();
     $this->data = array('parameters' => array("key" => "value"));
     $this->datas = array();
     // CRUD ___________________________________
     // Create
     for ($x = 0; $x <= 2; $x++) {
         $this->datas[] = Event::create($this->data);
     }
     $this->created = $this->datas[0];
     // Retrieve
     $this->retrieved = Event::retrieve($this->created->id);
     // Update
     // Delete
     $this->deleted = $this->created->delete();
     // List
     $this->order = Event::all(array("order" => "id"));
     $this->orderInv = Event::all(array("order" => "-id"));
     $this->limit5 = Event::all(array("limit" => "5", "order" => "id"));
     $this->limit1 = Event::all(array("start_after" => $this->limit5[1]->id, "end_before" => $this->limit5[3]->id));
     $this->oneId = Event::all(array("id" => $this->limit5[1]->id));
 }
开发者ID:ubivar,项目名称:ubivar-php,代码行数:23,代码来源:EventTest.php

示例7: index

 /**
  * Fetches events
  */
 function index()
 {
     $events = Event::all();
     header('Content-type:application/json');
     print json_encode($events);
 }
开发者ID:ACMASU,项目名称:October-2015-Workshop,代码行数:9,代码来源:EventController.php

示例8: getTagsList

 public function getTagsList($category)
 {
     switch ($category) {
         case 'Companies':
             return Companies::whereNull("Deleted")->orderBy('Company_Full_Name', 'asc')->get(['id_Company as id', 'Company_Full_Name as description'])->toJson();
         case 'People':
             return People::whereNull("Deleted")->orderBy('First_Name', 'asc')->get(['id_People as id', 'First_Name as description'])->toJson();
         case 'Vertical':
             return Vertical::all(['id_Vertical as id', 'Main_Description as description'])->toJson();
         case 'Products':
             return Products::whereNull("Deleted")->orderBy('Product_Title', 'asc')->get(['id_Product as id', 'Product_Title as description'])->toArray();
         case 'Events':
             return Event::all(['id_Event as id', 'Event_Title as description'])->toJson();
     }
 }
开发者ID:ghosthels,项目名称:ftproject,代码行数:15,代码来源:NewsController.php

示例9: index

 public static function index()
 {
     self::check_logged_in();
     $events = Event::all();
     View::make('Event/index.html', array('events' => $events));
 }
开发者ID:Jonharju,项目名称:Tsoha-Bootstrap,代码行数:6,代码来源:event_controller.php


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