cvs: php-testfest-web / README Solar.config.php index.php /PHP/App Base.php Contributors.php Index.php Mentors.php

From: Date: Tue, 01 Apr 2008 01:50:54 +0000
Subject: cvs: php-testfest-web / README Solar.config.php index.php /PHP/App Base.php Contributors.php Index.php Mentors.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-1430@lists.php.net to get a copy of this message
davidc Tue Apr 1 01:50:54 2008 UTC Added files: /php-testfest-web Solar.config.php index.php /php-testfest-web/PHP/App Base.php Contributors.php Index.php Mentors.php Modified files: /php-testfest-web README Log: - Added initial files. - Missing all directories with Views/Layouts/Locale, etc http://cvs.php.net/viewvc.cgi/php-testfest-web/README?r1=1.1&r2=1.2&diff_format=u Index: php-testfest-web/README diff -u php-testfest-web/README:1.1 php-testfest-web/README:1.2 --- php-testfest-web/README:1.1 Tue Apr 1 00:05:40 2008 +++ php-testfest-web/README Tue Apr 1 01:50:53 2008 @@ -1 +1,25 @@ - This code is running on the Solar framework + +VHOST Example +# http://local.testfest.com +<VirtualHost *:80> + ServerName local.testfest.com + DocumentRoot /path/to/testfest + <Directory /> + AllowOverride All + Order deny,allow + Allow from all + </Directory> + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_URI} !^/public/.*$ + RewriteRule ^(.*)$ /index.php [QSA,L] +</VirtualHost> + +or in a .htaccess + +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_URI} !^/public/.*$ +RewriteRule ^(.*)$ /index.php [QSA,L] http://cvs.php.net/viewvc.cgi/php-testfest-web/Solar.config.php?view=markup&rev=1.1 Index: php-testfest-web/Solar.config.php +++ php-testfest-web/Solar.config.php <?php $config = array(); // Base action href $config['Solar_Uri_Action']['path'] = "$URIBASE/index.php"; // Base public directory href $config['Solar_Uri_Public']['path'] = "$URIBASE/public"; $config['Solar_Controller_Front']['classes'] = array( 'PHP_App', ); // Done! return $config; ?> http://cvs.php.net/viewvc.cgi/php-testfest-web/index.php?view=markup&rev=1.1 Index: php-testfest-web/index.php +++ php-testfest-web/index.php <?php // $INCPATH is the the path to where Solar is installed, // typically the PEAR PHP directory. set_include_path(ini_get('include_path') . PATH_SEPARATOR . dirname(__FILE__)); // Load and start Solar. Be sure to point to the proper // location of your Solar.config.php file. require_once 'Solar.php'; Solar::start(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Solar.config.php'); // Instantiate and run the front controller. $front = Solar::factory('Solar_Controller_Front'); $front->display(); // Done! Solar::stop(); ?> http://cvs.php.net/viewvc.cgi/php-testfest-web/PHP/App/Base.php?view=markup&rev=1.1 Index: php-testfest-web/PHP/App/Base.php +++ php-testfest-web/PHP/App/Base.php <?php Solar::autoload('Solar_Controller_Page'); /** * That really is just a base so we * can have the same templates shared * accross modules */ class PHP_App_Base extends Solar_Controller_Page {} http://cvs.php.net/viewvc.cgi/php-testfest-web/PHP/App/Contributors.php?view=markup&rev=1.1 Index: php-testfest-web/PHP/App/Contributors.php +++ php-testfest-web/PHP/App/Contributors.php <?php /** * Any actions done by a contributor is going to be * done here. * * @todo Develop actionUpload * @todo Develop actionLogin * @todo Develop actionFiles */ class PHP_App_Contributors extends PHP_App_Base { /** * Type of layout to use. * * @var String The layout to use. */ protected $_layout = 'main'; /** * The default action * * This is the default action called when this * controller is invoked. * * @var string The default action to invoke. */ protected $_action_default = 'index'; /** * The output to display. This is mostly an * example of anything running with variables. * * @var string The output variable */ public $output = ''; /** * Action index. * * This action index when the /contributors root is invoked. * * The string passed to this output is the string that you can * get through $this->getText() which will then be i18ned to whichever * language it is set in your locale and in your locale folder. * * @see $this->output * @return void */ public function actionIndex() { $this->output = 'CONTRIBUTORS_WELCOME'; } } http://cvs.php.net/viewvc.cgi/php-testfest-web/PHP/App/Index.php?view=markup&rev=1.1 Index: php-testfest-web/PHP/App/Index.php +++ php-testfest-web/PHP/App/Index.php <?php /** * Index mockup * * This class behaves as if the /index was called * It is not currently 100% working, but most of it * is actually in place. * * @todo Add content to layout. */ class PHP_App_Index extends PHP_App_Base { /** * Type of layout to use. * * @var String The layout to use. */ protected $_layout = 'main'; /** * The default action * * This is the default action called when this * controller is invoked. * * @var string The default action to invoke. */ protected $_action_default = 'index'; /** * The output to display. This is mostly an * example of anything running with variables. * * @var string The output variable */ public $output = ''; /** * Action index. * * This action index when the /index root is invoked. * * @see $this->output * @return void */ public function actionIndex() { $this->output = 'Welcome to the 2008 Test Fest'; } } http://cvs.php.net/viewvc.cgi/php-testfest-web/PHP/App/Mentors.php?view=markup&rev=1.1 Index: php-testfest-web/PHP/App/Mentors.php +++ php-testfest-web/PHP/App/Mentors.php <?php /** * Any actions done by a mentor is going to be * done here. * * @todo Develop actionReview * @todo Develop actionComment * @todo Develop actionLivetesting */ class PHP_App_Mentors extends PHP_App_Base { /** * Type of layout to use. * * @var String The layout to use. */ protected $_layout = 'main'; /** * The default action * * This is the default action called when this * controller is invoked. * * @var string The default action to invoke. */ protected $_action_default = 'index'; /** * The output to display. This is mostly an * example of anything running with variables. * * @var string The output variable */ public $output = ''; /** * Action index. * * This action index when the /contributors root is invoked. * * The string passed to this output is the string that you can * get through $this->getText() which will then be i18ned to whichever * language it is set in your locale and in your locale folder. * * @see $this->output * @return void */ public function actionIndex() { $this->output = 'MENTORS_WELCOME'; } }

« previous php.webmaster (#1430) next »