Created
November 10, 2011 20:05
-
-
Save lonnen/1356011 to your computer and use it in GitHub Desktop.
Barebones Report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class NewReport_Model extends Model { | |
public function getNewReportViaWebService() { | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
require_once(Kohanna::find_file('libraries', 'somelib', TRUE 'php')); | |
class NewReport_Controller extends Controller { | |
public function __construct() { | |
parent::__construct(); | |
$this->newreport_model = new NewReport_Model(); | |
} | |
/** | |
* Public functions map to routes on the controller | |
* http://<base-url>/NewReport/index/[product, version, ?'foo'='bar', etc] | |
*/ | |
public function index() { | |
$resp = $this->newreport_model->getNewReportViaWebService(); | |
if ($resp) { | |
$this->setViewData(array( | |
'resp' => $resp, | |
'nav_selection' => 'new_report', | |
'foo' => $resp->foo, | |
)); | |
} else { | |
header("Data access error", TRUE, 500); | |
$this->setViewData(array( | |
'resp' => $resp, | |
'nav_selection' => 'new_report', | |
)); | |
} | |
} | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php slot::start('head') ?> | |
<title>New Report for <?php out::H($product) ?> <?php out::H($version) ?></title> | |
<?php echo html::script(array( | |
'js/path/to/scripts/you/need.js' | |
))?> | |
<?php echo html::stylesheet(array( | |
'css/path/to/css/you/need.css' | |
), 'screen')?> | |
<?php slot::end() ?> | |
<!-- Your custom front end HTML goes here --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment