<?php
/*
 * created on 11.3.2007
 * project: zend-hello-world
 * author: vlasta
 * version: $
 */
Zend::loadClass('Zend_Controller_Action');

class IndexController extends Zend_Controller_Action {
	
	public function __contruct() {
		parent::__construct();
	}
	
	public function indexAction() {
		$view = Zend::registry('view');
		$articleService = Zend::registry('articleService');
		
		$categories = $articleService->findAllCategories();
		
		$view->assign('categories', $categories);
		
		$out = $view->render('index.php');
		$this->getResponse()->appendBody($out);
	}
	
	public function noRouteAction() {
		$view = Zend::registry('view');
		$this->getResponse()->setRawHeader("HTTP/1.0 404 Not Found");	
		$out = $view->render('error404.php');
		$this->getResponse()->appendBody($out);
	}
}
?>