Commit 311f876b by Qiang Xue

MVC WIP

parent bd320533
...@@ -265,9 +265,9 @@ class Controller extends Component ...@@ -265,9 +265,9 @@ class Controller extends Component
return $this->createView()->render($view, $params); return $this->createView()->render($view, $params);
} }
public function renderText($text) public function renderContent($content)
{ {
return $this->createView()->renderText($text); return $this->createView()->renderContent($content);
} }
public function renderPartial($view, $params = array()) public function renderPartial($view, $params = array())
......
...@@ -321,7 +321,7 @@ class ErrorHandler extends Component ...@@ -321,7 +321,7 @@ class ErrorHandler extends Component
public function renderAsHtml($exception) public function renderAsHtml($exception)
{ {
$view = new View; $view = new View;
$view->_owner = $this; $view->owner = $this;
$name = !YII_DEBUG || $exception instanceof HttpException ? $this->errorView : $this->exceptionView; $name = !YII_DEBUG || $exception instanceof HttpException ? $this->errorView : $this->exceptionView;
echo $view->render($name, array( echo $view->render($name, array(
'exception' => $exception, 'exception' => $exception,
......
...@@ -49,7 +49,7 @@ class Widget extends Component ...@@ -49,7 +49,7 @@ class Widget extends Component
public function getId($autoGenerate = true) public function getId($autoGenerate = true)
{ {
if ($autoGenerate && $this->_id === null) { if ($autoGenerate && $this->_id === null) {
$this->_id = 'yw' . self::$_counter++; $this->_id = 'w' . self::$_counter++;
} }
return $this->_id; return $this->_id;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment