/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html/protected/components/Shared.php(16)
04 private static $cache = array(); 05 static function data($obj, $type=NULL) { 06 //if obj add it to cache 07 if(is_a($obj, 'CActiveRecord')) { 08 $class = get_class($obj); 09 $id = $obj->getPrimaryKey(); 10 if(!is_array($id) && !isset(self::$cache[$class][$id])) self::$cache[$class][$id] = $obj; 11 return $obj; 12 } 13 14 //some safety checks 15 //note: it does not support composite primary keys 16 if(!is_numeric($obj)) trigger_error('$obj must be id if not CActieRecord', E_USER_ERROR); 17 if(is_null($type)) trigger_error('$type required unless CActieRecord obj', E_USER_ERROR); 18 19 if(isset(self::$cache[$type][(int)$obj])) return self::$cache[$type][(int)$obj]; 20 21 $ret = CActiveRecord::model($type)->findByPk($obj); 22 if(!$ret) return $ret; 23 $id = $ret->getPrimaryKey(); 24 if(!is_array($id)) self::$cache[$type][$id] = $ret; 25 26 return $ret; 27 } 28 }
#0 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html/protected/components/Shared.php(16): trigger_error("$obj must be id if not CActieRecord", 256) 11 return $obj; 12 } 13 14 //some safety checks 15 //note: it does not support composite primary keys 16 if(!is_numeric($obj)) trigger_error('$obj must be id if not CActieRecord', E_USER_ERROR); 17 if(is_null($type)) trigger_error('$type required unless CActieRecord obj', E_USER_ERROR); 18 19 if(isset(self::$cache[$type][(int)$obj])) return self::$cache[$type][(int)$obj]; 20 21 $ret = CActiveRecord::model($type)->findByPk($obj); |
#1 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html/protected/components/EstateRoute.php(142): Shared::data("", "Hood") 137 //return false; 138 }// ~ switch ($params['type']) 139 }// ~ if($params['language'] == 'en') 140 if(!is_numeric($params['city_id']) && !is_numeric($params['hood_id'])) $url.= $district; 141 else if(isset($params['hood_id'])) { 142 $hood = Shared::data($params['hood_id'], 'Hood'); 143 if($hood) { 144 $city = Shared::data($hood->city_id, 'City'); 145 if($city) { 146 if(isset($params['city_id']) && $params['city_id']!=$city->getPrimaryKey()) trigger_error("City id missmatch", E_USER_ERROR); 147 $url.=strtolower(str_replace(' ', '-', $city->name.'+'.$hood->name)); |
#2 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CUrlManager.php(286): EstateRoute->createUrl(UrlManager, "estate/index", array("hood_id" => "", "language" => "ro", "tranzaction" => 0, "type" => 5, ...), "&") 281 $route=trim($route,'/'); 282 foreach($this->_rules as $i=>$rule) 283 { 284 if(is_array($rule)) 285 $this->_rules[$i]=$rule=Yii::createComponent($rule); 286 if(($url=$rule->createUrl($this,$route,$params,$ampersand))!==false) 287 { 288 if($rule->hasHostInfo) 289 return $url==='' ? '/'.$anchor : $url.$anchor; 290 else 291 return $this->getBaseUrl().'/'.$url.$anchor; |
#3 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html/protected/components/UrlManager.php(8): CUrlManager->createUrl("estate/index", array("hood_id" => null, "language" => "ro", "tranzaction" => 0, "type" => 5, ...), "&") 03 { 04 public function createUrl($route,$params=array(),$ampersand='&') 05 { 06 //var_dump($route);die(); 07 if(strcasecmp('admin/', substr($route, 0, 6)) !== 0 && !isset($params['language'])) $params['language'] = Yii::app()->language; 08 return parent::createUrl($route, $params, $ampersand); 09 } 10 public function parseUrl($request) 11 { 12 $ret = parent::parseUrl($request); 13 |
#4 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/base/CApplication.php(522): UrlManager->createUrl("estate/index", array("hood_id" => null, "language" => "ro", "tranzaction" => 0, "type" => 5, ...), "&") 517 * @param string $ampersand the token separating name-value pairs in the URL. 518 * @return string the constructed URL 519 */ 520 public function createUrl($route,$params=array(),$ampersand='&') 521 { 522 return $this->getUrlManager()->createUrl($route,$params,$ampersand); 523 } 524 525 /** 526 * Creates an absolute URL based on the given controller and action information. 527 * @param string $route the URL route. This should be in the format of 'ControllerID/ActionID'. |
#5 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CController.php(964): CApplication->createUrl("estate/index", array("hood_id" => null, "language" => "ro", "tranzaction" => 0, "type" => 5, ...), "&") 959 $route=$this->getId().'/'.$this->getAction()->getId(); 960 else if(strpos($route,'/')===false) 961 $route=$this->getId().'/'.$route; 962 if($route[0]!=='/' && ($module=$this->getModule())!==null) 963 $route=$module->getId().'/'.$route; 964 return Yii::app()->createUrl(trim($route,'/'),$params,$ampersand); 965 } 966 967 /** 968 * Creates an absolute URL for the specified action defined in this controller. 969 * @param string $route the URL route. This should be in the format of 'ControllerID/ActionID'. |
#6 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CPagination.php(200): CController->createUrl("", array("hood_id" => null, "language" => "ro", "tranzaction" => 0, "type" => 5, ...)) 195 $params=$this->params===null ? $_GET : $this->params; 196 if($page>0) // page 0 is the default 197 $params[$this->pageVar]=$page+1; 198 else 199 unset($params[$this->pageVar]); 200 return $controller->createUrl($this->route,$params); 201 } 202 203 /** 204 * Applies LIMIT and OFFSET to the specified query criteria. 205 * @param CDbCriteria $criteria the query criteria that should be applied with the limit |
#7 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/widgets/pagers/CBasePager.php(127): CPagination->createPageUrl(EstateController, 0) 122 * @return string the created URL 123 * @see CPagination::createPageUrl 124 */ 125 protected function createPageUrl($page) 126 { 127 return $this->getPages()->createPageUrl($this->getController(),$page); 128 } 129 } |
#8 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/widgets/pagers/CLinkPager.php(156): CBasePager->createPageUrl(0) 151 */ 152 protected function createPageButton($label,$page,$class,$hidden,$selected) 153 { 154 if($hidden || $selected) 155 $class.=' '.($hidden ? self::CSS_HIDDEN_PAGE : self::CSS_SELECTED_PAGE); 156 return '<li class="'.$class.'">'.CHtml::link($label,$this->createPageUrl($page)).'</li>'; 157 } 158 159 /** 160 * @return array the begin and end pages that need to be displayed. 161 */ |
#9 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/widgets/pagers/CLinkPager.php(120): CLinkPager->createPageButton("<< Inceput", 0, "first", true, ...) 115 list($beginPage,$endPage)=$this->getPageRange(); 116 $currentPage=$this->getCurrentPage(false); // currentPage is calculated in getPageRange() 117 $buttons=array(); 118 119 // first page 120 $buttons[]=$this->createPageButton($this->firstPageLabel,0,self::CSS_FIRST_PAGE,$currentPage<=0,false); 121 122 // prev page 123 if(($page=$currentPage-1)<0) 124 $page=0; 125 $buttons[]=$this->createPageButton($this->prevPageLabel,$page,self::CSS_PREVIOUS_PAGE,$currentPage<=0,false); |
#10 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/widgets/pagers/CLinkPager.php(98): CLinkPager->createPageButtons() 093 * This overrides the parent implementation by displaying the generated page buttons. 094 */ 095 public function run() 096 { 097 $this->registerClientScript(); 098 $buttons=$this->createPageButtons(); 099 if(empty($buttons)) 100 return; 101 echo $this->header; 102 echo CHtml::tag('ul',$this->htmlOptions,implode("\n",$buttons)); 103 echo $this->footer; |
#11 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CBaseController.php(166): CLinkPager->run() 161 return ob_get_clean(); 162 } 163 else 164 { 165 $widget=$this->createWidget($className,$properties); 166 $widget->run(); 167 return $widget; 168 } 169 } 170 171 /** |
#12 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html/protected/views/estate/index.php(18): CBaseController->widget("CLinkPager", array("pages" => CPagination, "header" => "", "nextPageLabel" => "»", "prevPageLabel" => "«")) 13 echo $this->renderPartial('_listing', array('model'=>$estate)); 14 } 15 ?> 16 17 <div class="pager"> 18 <?php $this->widget('CLinkPager', array('pages'=>$dataProvider->getPagination(),'header'=>'','nextPageLabel'=>'»','prevPageLabel'=>'«'))?> 19 </div> |
#13 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CBaseController.php(119): require("/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html...") 114 $data=$_data_; 115 if($_return_) 116 { 117 ob_start(); 118 ob_implicit_flush(false); 119 require($_viewFile_); 120 return ob_get_clean(); 121 } 122 else 123 require($_viewFile_); 124 } |
#14 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CBaseController.php(88): CBaseController->renderInternal("/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html...", array("dataProvider" => CActiveDataProvider), true) 83 { 84 $widgetCount=count($this->_widgetStack); 85 if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile)) 86 $content=$renderer->renderFile($this,$viewFile,$data,$return); 87 else 88 $content=$this->renderInternal($viewFile,$data,$return); 89 if(count($this->_widgetStack)===$widgetCount) 90 return $content; 91 else 92 { 93 $widget=end($this->_widgetStack); |
#15 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CController.php(866): CBaseController->renderFile("/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html...", array("dataProvider" => CActiveDataProvider), true) 861 */ 862 public function renderPartial($view,$data=null,$return=false,$processOutput=false) 863 { 864 if(($viewFile=$this->getViewFile($view))!==false) 865 { 866 $output=$this->renderFile($viewFile,$data,true); 867 if($processOutput) 868 $output=$this->processOutput($output); 869 if($return) 870 return $output; 871 else |
#16 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CController.php(779): CController->renderPartial("index", array("dataProvider" => CActiveDataProvider), true) 774 */ 775 public function render($view,$data=null,$return=false) 776 { 777 if($this->beforeRender($view)) 778 { 779 $output=$this->renderPartial($view,$data,true); 780 if(($layoutFile=$this->getLayoutFile($this->layout))!==false) 781 $output=$this->renderFile($layoutFile,array('content'=>$output),true); 782 783 $this->afterRender($view,$output); 784 |
#17 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html/protected/controllers/EstateController.php(151): CController->render("index", array("dataProvider" => CActiveDataProvider)) 146 147 $dataProvider = new CActiveDataProvider('Estate', array( 148 'criteria'=>$criteria, 149 'pagination'=>array('pageVar'=>'page','pageSize' => 24), 150 )); 151 $this->render('index',array('dataProvider'=>$dataProvider)); 152 } 153 154 public function actionSearch() 155 { 156 $criteria = $this->newCriteria(); |
#18 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/actions/CInlineAction.php(50): EstateController->actionIndex() 45 $controller=$this->getController(); 46 $method=new ReflectionMethod($controller, $methodName); 47 if($method->getNumberOfParameters()>0) 48 return $this->runWithParamsInternal($controller, $method, $params); 49 else 50 return $controller->$methodName(); 51 } 52 53 } |
#19 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CController.php(300): CInlineAction->runWithParams(array("hood_id" => null, "language" => "ro", "tranzaction" => 0, "type" => 5, ...)) 295 { 296 $priorAction=$this->_action; 297 $this->_action=$action; 298 if($this->beforeAction($action)) 299 { 300 if($action->runWithParams($this->getActionParams())===false) 301 $this->invalidActionParams($action); 302 else 303 $this->afterAction($action); 304 } 305 $this->_action=$priorAction; |
#20 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CController.php(278): CController->runAction(CInlineAction) 273 * @see runAction 274 */ 275 public function runActionWithFilters($action,$filters) 276 { 277 if(empty($filters)) 278 $this->runAction($action); 279 else 280 { 281 $priorAction=$this->_action; 282 $this->_action=$action; 283 CFilterChain::create($this,$action,$filters)->run(); |
#21 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array()) 252 { 253 if(($parent=$this->getModule())===null) 254 $parent=Yii::app(); 255 if($parent->beforeControllerAction($this,$action)) 256 { 257 $this->runActionWithFilters($action,$this->filters()); 258 $parent->afterControllerAction($this,$action); 259 } 260 } 261 else 262 $this->missingAction($actionID); |
#22 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CWebApplication.php(277): CController->run("index") 272 { 273 list($controller,$actionID)=$ca; 274 $oldController=$this->_controller; 275 $this->_controller=$controller; 276 $controller->init(); 277 $controller->run($actionID); 278 $this->_controller=$oldController; 279 } 280 else 281 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 282 array('{route}'=>$route===''?$this->defaultController:$route))); |
#23 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/web/CWebApplication.php(136): CWebApplication->runController("estate/index") 131 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 132 $_GET[$name]=$value; 133 } 134 else 135 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 136 $this->runController($route); 137 } 138 139 /** 140 * Registers the core application components. 141 * This method overrides the parent implementation by registering additional core components. |
#24 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/framework/base/CApplication.php(158): CWebApplication->processRequest() 153 */ 154 public function run() 155 { 156 if($this->hasEventHandler('onBeginRequest')) 157 $this->onBeginRequest(new CEvent($this)); 158 $this->processRequest(); 159 if($this->hasEventHandler('onEndRequest')) 160 $this->onEndRequest(new CEvent($this)); 161 } 162 163 /** |
#25 |
+
–
/home/napocasaimobiliare/domains/napocaimobiliare.ro/public_html/index.php(15): CApplication->run() 10 11 // remove the folowin line when in production model - DEV=development 12 define('DEV', false); 13 14 require_once($yii); 15 Yii::createWebApplication($config)->run(); |