當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Review::load方法代碼示例

本文整理匯總了PHP中Review::load方法的典型用法代碼示例。如果您正苦於以下問題:PHP Review::load方法的具體用法?PHP Review::load怎麽用?PHP Review::load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Review的用法示例。


在下文中一共展示了Review::load方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

 function render()
 {
     $op = $this->op = @$this->module_params['op'];
     if ($this->op) {
         if (!empty($this->module_params['comment'])) {
             $target = new Comment2();
             $target->load($this->module_params['comment']);
         } else {
             if (!empty($this->module_params['review'])) {
                 $target = new Review();
                 $target->load($this->module_params['review']);
             } else {
                 if (!empty($this->module_params['uid'])) {
                     $target = new ShadowUser('videoplay');
                     $target->load_by_pa((int) $this->module_params['uid']);
                 }
             }
         }
         switch ($op) {
             case "delete":
                 if (!empty($this->module_params['uid'])) {
                     $target->remove();
                 } else {
                     $target->delete();
                 }
                 break;
             case "hide":
             case "show":
                 if (!empty($this->module_params['uid'])) {
                     $target->toggle_active($op == 'hide' ? -1 : 1);
                 } else {
                     $target->toggle_active($op == 'hide' ? 0 : 1);
                 }
                 break;
         }
     }
     switch ($this->mode) {
         case "comments":
             $inner_template = dirname(__FILE__) . '/admin_content.tpl';
             list($this->contents, $this->n, $this->n_pages, $this->page, $this->per_page) = Comment2::get_recent($this->per_page, $this->page);
             break;
         case "reviews":
             $inner_template = dirname(__FILE__) . '/admin_content.tpl';
             list($this->contents, $this->n, $this->n_pages, $this->page, $this->per_page) = Review::get_recent($this->per_page, $this->page);
             break;
         case "users":
             $inner_template = dirname(__FILE__) . '/admin_users.tpl';
             list($this->users, $this->n, $this->n_pages, $this->page, $this->per_page) = ShadowUser::admin_paged('videoplay', $this->per_page, $this->page);
             break;
         default:
             return "Unknown display type.<pre>" . print_r($this, 1) . "</pre>";
             break;
     }
     $inner_html_gen =& new Template($inner_template, $this);
     $this->inner_HTML = $inner_html_gen->fetch();
     $content = parent::render();
     return $content;
 }
開發者ID:CivicCommons,項目名稱:oldBellCaPA,代碼行數:58,代碼來源:VideoplayAdminModule.php

示例2: get

 public static function get($review_id)
 {
     $rev = new Review();
     $rev->load($review_id);
     return $rev;
 }
開發者ID:Cyberspace-Networks,項目名稱:PeopleAggregator,代碼行數:6,代碼來源:Review.php


注:本文中的Review::load方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。