本文整理匯總了PHP中MyView::setInfoToDisplay方法的典型用法代碼示例。如果您正苦於以下問題:PHP MyView::setInfoToDisplay方法的具體用法?PHP MyView::setInfoToDisplay怎麽用?PHP MyView::setInfoToDisplay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MyView
的用法示例。
在下文中一共展示了MyView::setInfoToDisplay方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: MyModel
<?php
/*include_once("myconfig.php");*/
include '.././classes/mymodel.php';
include '.././classes/myview.php';
/*CONTROLLER CREATES THE MODEL*/
$theActualModel = new MyModel();
/*TEST IT IS INSTANCIATED*/
$myTemp = $theActualModel->getQueryValue();
echo $myTemp;
echo "<p></p>";
/*CONTROLLER FINDS OUT THE QUERY STRING APPENDED TO THE URL, REVERSES IT, AND SENDS IT TO THE MODEL*/
/*... BUT MAYBE IT WOULD BE BETTER FOR THE MANIPULATION TO OCCUR INSIDE THE MODEL?*/
$theURLStuff = strrev($_SERVER['QUERY_STRING']);
$theActualModel->setQueryValue($theURLStuff);
/*CONTROLLER CREATES THE VIEW*/
$theActualView = new MyView();
/*TEST THE VIEW WORKS*/
$myTempViewModelText = $theActualView->displayTheInfo();
/*echo $myTempViewModelText ; */
echo "<p>Here is the number at the end of the URL, but reversed.</p>";
/*CONTROLLER GETS TEXT FROM THE MODEL AND SENDS TO THE VIEW*/
$theActualView->setInfoToDisplay($theActualModel->getQueryValue());
/*CONTROLLER TELLS VIEW TO DISPLAY THE TEXT*/
$theActualView->displayTheInfo();