FuelPHP Bin
Sign in
Name
Main Controller
Url:
Fork
<?php /** * Fuel is a fast, lightweight, community driven PHP5 framework. * * @package Fuel * @version 1.5 * @author Fuel Development Team * @license MIT License * @copyright 2010 - 2013 Fuel Development Team * @link http://fuelphp.com */ /** * The Welcome Controller. * * A basic controller example. Has examples of how to set the * response body and status. * * @package app * @extends Controller */ use \Model\Airport as Airport; class Controller_Welcome extends Controller_Template { public $template = 'templates/main'; /** * The basic welcome message * * @access public * @return Response */ public function action_index() { //$airport = Airport::fetch("KPHL"); //echo $airport->ident; $data = array(); $this->template->title = 'Testing'; $this->template->content = View::forge('welcome/index', $data); } /** * A typical "Hello, Bob!" type example. This uses a ViewModel to * show how to use them. * * @access public * @return Response */ public function action_hello() { return Response::forge(ViewModel::forge('welcome/hello')); } /** * The 404 action for the application. * * @access public * @return Response */ public function action_404() { return Response::forge(ViewModel::forge('welcome/404'), 404); } }