se8820726
پنج شنبه 04 مهر 1392, 19:24 عصر
سلام آقا میخواستم بدونم معنیه علامت & تو نمونه کد زیر چیه ؟؟
class GreetingsController extends JController
{
/**
* Method to display the view
*
* @access public
*/
function display()
{
//This sets the default view (second argument)
$viewName = JRequest::getVar( 'view', 'list' );
//This sets the default layout/template for the view
$viewLayout = JRequest::getVar( 'layout', 'listlayout' );
$view = & $this->getView($viewName);
// Get/Create the model
if ($model = & $this->getModel('greetings')) {
//Push the model into the view (as default)
//Second parameter indicates that it is the default model for the view
$view->setModel($model, true);
}
$view->setLayout($viewLayout);
$view->display();
}
}
class GreetingsController extends JController
{
/**
* Method to display the view
*
* @access public
*/
function display()
{
//This sets the default view (second argument)
$viewName = JRequest::getVar( 'view', 'list' );
//This sets the default layout/template for the view
$viewLayout = JRequest::getVar( 'layout', 'listlayout' );
$view = & $this->getView($viewName);
// Get/Create the model
if ($model = & $this->getModel('greetings')) {
//Push the model into the view (as default)
//Second parameter indicates that it is the default model for the view
$view->setModel($model, true);
}
$view->setLayout($viewLayout);
$view->display();
}
}