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


PHP pathang::getController方法代碼示例

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


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

示例1: main

 public function main()
 {
     //$username = pathang::getInstance('node')->get('n1');
     //$uid = pathang::getModel('userlog')->getUserId($username);
     pathang::GetInstance('request')->set('snippet', 1);
     $popular = pathang::getController('profile')->popular();
     $count = 0;
     pathang::GetInstance('packet')->Set('popular', $popular);
     pathang::GetInstance('packet')->Set('count', $count);
     pathang::display();
 }
開發者ID:adrixnac,項目名稱:RedSocial,代碼行數:11,代碼來源:popular.php

示例2: main

 public function main()
 {
     $username = pathang::getInstance('node')->get('n1');
     $uid = pathang::getModel('userlog')->getUserId($username);
     pathang::GetInstance('request')->set('snippet', 1);
     $following = pathang::getController('profile')->following();
     $count = pathang::getModel('profile')->followingCount($uid);
     pathang::GetInstance('packet')->Set('following', $following);
     pathang::GetInstance('packet')->Set('count', $count);
     pathang::display();
 }
開發者ID:adrixnac,項目名稱:RedSocial,代碼行數:11,代碼來源:following.php

示例3: about

 public function about()
 {
     //calling request object and setting the page and color to be used in the template page
     $request = pathang::getInstance('request');
     $request->page = 'color';
     $request->color = 'orange';
     //identifying the user from the nodes
     $node = pathang::getInstance('node');
     $user = $node->get('n2');
     //based on the node switching between controllers
     if ($user != null) {
         pathang::getController('sample', $user);
     } else {
         pathang::render('sample', 'about');
     }
 }
開發者ID:kenjiro7,項目名稱:pathang-framework,代碼行數:16,代碼來源:root.php

示例4: main

 public function main()
 {
     // get request object
     $request = pathang::GetInstance('request');
     // set the snippet,limit and unread varaibles
     $request->Set('snippet', 'one');
     $request->set('limit', 3);
     $request->set('unread', true);
     // if user exists then only display
     if (isset(pathang::GetInstance('session')->get('liveuser')->username)) {
         $liveuser = pathang::GetInstance('session')->get('liveuser')->username;
         $user = pathang::GetInstance('node')->get('n1');
         //if the user is liveuser then display
         if ($user == $liveuser) {
             //get notification and counter
             $notify = pathang::getController('profile')->notifications()->messages;
             $count = pathang::getController('profile')->notifications()->unread;
             pathang::GetInstance('packet')->set('notify', $notify);
             pathang::GetInstance('packet')->set('count', $count);
             pathang::display();
         }
     }
 }
開發者ID:gibranda,項目名稱:Feedstack,代碼行數:23,代碼來源:notifications.php

示例5: user

 public function user()
 {
     $n2 = strtoupper(pathang::getInstance('node')->get('n2'));
     switch ($n2) {
         case 'LOGIN':
         case 'LOGOUT':
         case 'REGISTER':
         case 'FORGOT':
         case 'USERNAMECHECK':
         case 'EMAILCHECK':
             pathang::getController('userlog')->{$n2}();
             break;
         case 'SEARCH':
         case 'FOLLOW':
         case 'UNFOLLOW':
         case 'NOTIFY':
             pathang::getController('usermain')->{$n2}();
             break;
         default:
             $this->main();
     }
 }
開發者ID:gibranda,項目名稱:Feedstack,代碼行數:22,代碼來源:root.php


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