<?php
/**
* ページセレクタ
*
* PHP version 5
*
* @package    renderers
* @author     stk2k <stk2k@sazysoft.com>
* @copyright  2008 stk2k, sazysoft
*/

class MyPageSelector extends CharcoalComponent implements IPageSelector
{

	/**
	 *   ページを決定する
	 */
	public function selectPage( String $proc_name, TaskSnapshot $snapshot, Response $response )
	{
		$page_map = array(

				'index' => 'main/index.tpl',
				'p01' => 'main/01_hello_world.tpl',
				'p02' => 'main/02_breadcrumb.tpl',
				'p03' => 'main/03_pear_db.tpl',
				'p04' => 'main/04_smarty.tpl',
				'p05' => 'main/05_session.tpl',
				'p06' => 'main/06_form.tpl',
				'p07' => 'main/07_shell.tpl',
				'p08' => 'main/08_module_task.tpl',
				'p09' => 'main/09_stateful_task.tpl',

			);


		$response->set( s('main_template'), $page_map["$proc_name"] );

		return s('top_page.tpl');
	}
}
