InitPHP (A PHP Framework) 用户手册
第4章 4.6 Util工具库

详细说明:

如何加载工具库:

class indexController extends Controller {
	
	public $initphp_list = array('test'); 
	
	public function run() {
		$sqlcontrol = $this->getUtil('sqlcontrol'); 
		$sqlcontrol->start();
		$this->getTestService()->test();
		$sqlcontrol->end();
		$this->view->display(); //模板显示
	}
	
	public function test() {
		echo 'Hello World';
	}
	
	/**
	 * @return testService
	 */
	private function getTestService() {
		return InitPHP::getService('test','test');
	}

}
	

开发工具库: