Start

End

Group

Larry, on page 150 of the YiiBook2 (latest version), you write that the following code is "verbose, redundant, and illogical":
$model = new Page();
$model = $model->findOne($id);
Instead of creating an instance of the Page class, as shown above, you say we should use a static class instance (or static method?), like this:
if (($model = Page::findOne($id)) !== null) {
return $model;
etc.
I don't understand why the first example is "verbose, redundant, and illogical", and why the second example is preferred. Can you please explain this?
Thanks.