<?php // Get sencha2 require_once "../atsumi/init.php"; // Add class areas to the class loader atsumi_Loader::references(array('atsumi-examples' => 'app examples mvc', 'atsumi' => 'caster mvc widgets validators cache database')); // Initalise sencha and the url parser $settings = new ex_Settings(); Atsumi::initApp($settings); Atsumi::app__setUriParser('uriparser_Gyokuro'); // Execute sencha try { Atsumi::app__go($_SERVER['REDIRECT_URL']); } catch (app_PageNotFoundException $e) { Atsumi::app__go("/404/"); } // Render the processed output Atsumi::app__render();
<?php /** * File defines all functionaility of the mvc_ClamShellHandler class. * @version 0.90 * @package Atsumi.Framework * @copyright Copyright(C) 2008, James A. Forrester-Fellowes. All rights reserved. * @license GNU/GPL, see license.txt * The Atsumi Framework is open-source software. This version may have been modified pursuant to * the GNU General Public License, and as distributed it includes or is derivative of works * licensed under the GNU General Public License or other free or open source software licenses. * See copyright.txt for copyright notices and details. */ atsumi_Loader::references(atsumi_Loader::getAtsumiDir(), 'jsmin'); /** * ClamShell is the material used to create the white stones in Go the game from which Atsumi's * name is derived from. ClamShell is also Atsumi's html templating engine which was inspired by * Smarty and the .NET Framework render method with a few of our own smart ideas. * * ClamShell is an inheriting template engine, meaning templates can inherit off each other much * like the way classes inherit from each other in PHP * @package Atsumi.Framework * @subpackage MVC * @since 0.90 */ class mvc_ClamShellViewHandler implements mvc_ViewHandlerInterface { /* CONSTANTS */ const CACHE_NONE = 0; const CACHE_FLATFILE = 1; const CACHE_HANDER = 2;
<?php // Get sencha2 require_once "../atsumi/init.php"; // Add class areas to the class loader atsumi_Loader::references(array('atsumi-live' => 'app live site', 'atsumi' => 'caster mvc widgets validators')); // Initalise atsumi and the uri parser $settings = new al_Settings(); Atsumi::initApp($settings); Atsumi::app__setUriParser('uriparser_Gyokuro'); // Execute Atsumi try { Atsumi::app__go($_SERVER['REDIRECT_URL']); } catch (app_PageNotFoundException $e) { Atsumi::app__go("/404/"); } // Render the processed output Atsumi::app__render();
<?php /* include Atsumi */ require_once "../atsumi/init.php"; /* load the necessary packages in Atsumi & project */ atsumi_Loader::references(array('atsumi' => 'utility mvc database', 'projectFolder' => 'app mvc')); /* initialise the project settings */ $settings = new boot_Settings(); /* load the project settings in to Atsumi */ Atsumi::initApp($settings); try { /* process the controller & method requested by the URI */ Atsumi::app__go($_SERVER['REQUEST_URI']); } catch (app_PageNotFoundException $e) { /* handle 404's */ Atsumi::app__go("/404/"); } /* render the page */ Atsumi::app__render();
<?php atsumi_Loader::references(array('atsumi' => 'utility/calendar')); abstract class db_AbstractRow { private $rowData; protected $caster; protected abstract function initCaster(); public function __construct($rowData) { $this->rowData = $rowData; } public function cast($format, $column) { if (!array_key_exists($column, $this->rowData)) { throw new db_RowColumnNotFoundException('Column not found: ' . $column); } $data = $this->rowData[$column]; $this->initCaster(); return $this->caster->cast('%' . $format, $data); } public function getRaw($column) { return $data[$column]; } public function __get($call) { $pos = strpos($call, '_'); return call_user_func_array(array($this, 'cast'), array(substr($call, 0, $pos), substr($call, $pos + 1))); } }