当前位置: 首页>>代码示例>>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;未经允许,请勿转载。