Harro Verton wrote on Thursday 15th of December 2011:
$id in the first example has a value because it is passed as parameter to action_view().
But where does $title in the second example come from? It isn't defined anywhere...
public function action_view($id = null)
$post = Model_Post::find($id);
$this->template->title = 'Post'.$post->title;
$data['post'] = $post;
$this->template->content = View::forge('post/view', $data);
Vladimir Michalík wrote on Saturday 17th of December 2011:
But why referring to this script orm\model.php [ public static function find($id = null, array $options = array()) ] when I wanted to get $title.
It looks like you're new here. If you want to get involved, click one of these buttons!