CException
SearchForm and its behaviors do not have a method or closure named "tableName".
C:\xampp\htdocs\yii\framework\base\CComponent.php(266)
254 public function __call($name,$parameters)
255 {
256 if($this->_m!==null)
257 {
258 foreach($this->_m as $object)
259 {
260 if($object->getEnabled() && method_exists($object,$name))
261 return call_user_func_array(array($object,$name),$parameters);
262 }
263 }
264 if(class_exists('Closure', false) && $this->canGetProperty($name) && $this->$name instanceof Closure)
265 return call_user_func_array($this->$name, $parameters);
266 throw new CException(Yii::t('yii','{class} and its behaviors do not have a method or closure named "{name}".',
267 array('{class}'=>get_class($this), '{name}'=>$name)));
268 }
269
270 /**
271 * Returns the named behavior object.
272 * The name 'asa' stands for 'as a'.
273 * @param string $behavior the behavior name
274 * @return IBehavior the behavior object, or null if the behavior does not exist
275 */
276 public function asa($behavior)
277 {
278 return isset($this->_m[$behavior]) ? $this->_m[$behavior] : null;
Stack Trace
#0
+ C:\xampp\htdocs\yii\framework\db\ar\CActiveRecord.php(2262): CComponent->__call("tableName", array())
#1
+ C:\xampp\htdocs\yii\framework\db\ar\CActiveRecord.php(2262): SearchForm->tableName()
#2
+ C:\xampp\htdocs\yii\framework\db\ar\CActiveRecord.php(379): CActiveRecordMetaData->__construct(SearchForm)
#3
+ C:\xampp\htdocs\yii\framework\web\CActiveDataProvider.php(75): CActiveRecord::model("SearchForm")
#4
– C:\xampp\htdocs\cookumber\protected\views\searchForm\SearchResult.php(3): CActiveDataProvider->__construct("SearchForm")
1 <?php
2
3 $dataProvider=new CActiveDataProvider('SearchForm');
4
5 $this->widget('zii.widgets.grid.CGridView', array(
6 'dataProvider'=>$dataProvider,
7 ));
8
#5
+ C:\xampp\htdocs\yii\framework\web\CBaseController.php(127): require("C:\xampp\htdocs\cookumber\protected\views\searchForm\SearchResul...")
#6
+ C:\xampp\htdocs\yii\framework\web\CBaseController.php(96): CBaseController->renderInternal("C:\xampp\htdocs\cookumber\protected\views\searchForm\SearchResul...", array("dataProvider" => CSqlDataProvider), true)
#7
+ C:\xampp\htdocs\yii\framework\web\CController.php(870): CBaseController->renderFile("C:\xampp\htdocs\cookumber\protected\views\searchForm\SearchResul...", array("dataProvider" => CSqlDataProvider), true)
#8
+ C:\xampp\htdocs\yii\framework\web\CController.php(783): CController->renderPartial("SearchResult", array("dataProvider" => CSqlDataProvider), true)
#9
– C:\xampp\htdocs\cookumber\protected\controllers\SearchFormController.php(33): CController->render("SearchResult", array("dataProvider" => CSqlDataProvider))
28 ),
29 'pagination'=>array(
30 'pageSize'=>10,
31 ),
32 ));
33 $this->render('SearchResult',array('dataProvider'=>$dataProvider,));
34 }
35 else{
36 $this->render('SearchForm',array('model'=>$model));
37 }
38 }
#10
+ C:\xampp\htdocs\yii\framework\web\actions\CInlineAction.php(50): SearchFormController->actionSearch()
#11
+ C:\xampp\htdocs\yii\framework\web\CController.php(309): CInlineAction->runWithParams(array("r" => "SearchForm/Search"))
#12
+ C:\xampp\htdocs\yii\framework\web\CController.php(287): CController->runAction(CInlineAction)
#13
+ C:\xampp\htdocs\yii\framework\web\CController.php(266): CController->runActionWithFilters(CInlineAction, array())
#14
+ C:\xampp\htdocs\yii\framework\web\CWebApplication.php(276): CController->run("Search")
#15
+ C:\xampp\htdocs\yii\framework\web\CWebApplication.php(135): CWebApplication->runController("SearchForm/Search")
#16
+ C:\xampp\htdocs\yii\framework\base\CApplication.php(162): CWebApplication->processRequest()
#17
– C:\xampp\htdocs\cookumber\index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11
12 require_once($yii);
13 Yii::createWebApplication($config)->run();