本文整理汇总了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();
}
示例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();
}
示例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');
}
}
示例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();
}
}
}
示例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();
}
}