Changeset 2371
- Timestamp:
- 03/16/08 18:15:27 (10 months ago)
- Location:
- trunk
- Files:
-
- 1 removed
- 36 modified
- 19 copied
-
CHANGELOG (modified) (1 diff)
-
samples/app/config/action_filters.xml (modified) (1 diff)
-
samples/app/config/autoload.xml (modified) (1 diff)
-
samples/app/config/databases.xml (modified) (1 diff)
-
samples/app/config/factories.xml (modified) (1 diff)
-
samples/app/config/output_types.xml (modified) (1 diff)
-
samples/app/config/settings.xml (modified) (2 diffs)
-
samples/app/config/translation.xml (modified) (1 diff)
-
samples/app/lib/action (copied) (copied from branches/0.11/samples/app/lib/action)
-
samples/app/lib/action/AgaviSampleAppBaseAction.class.php (copied) (copied from branches/0.11/samples/app/lib/action/AgaviSampleAppBaseAction.class.php)
-
samples/app/lib/model (copied) (copied from branches/0.11/samples/app/lib/model)
-
samples/app/lib/model/AgaviSampleAppBaseModel.class.php (copied) (copied from branches/0.11/samples/app/lib/model/AgaviSampleAppBaseModel.class.php)
-
samples/app/lib/view (copied) (copied from branches/0.11/samples/app/lib/view)
-
samples/app/lib/view/AgaviSampleAppBaseView.class.php (copied) (copied from branches/0.11/samples/app/lib/view/AgaviSampleAppBaseView.class.php)
-
samples/app/modules/Default/config/autoload.xml (modified) (1 diff)
-
samples/app/modules/Default/config/module.xml (modified) (1 diff)
-
samples/app/modules/Default/lib/action/AgaviSampleAppDefaultBaseAction.class.php (modified) (1 diff)
-
samples/app/modules/Default/lib/model (copied) (copied from branches/0.11/samples/app/modules/Default/lib/model)
-
samples/app/modules/Default/lib/model/AgaviSampleAppDefaultBaseModel.class.php (copied) (copied from branches/0.11/samples/app/modules/Default/lib/model/AgaviSampleAppDefaultBaseModel.class.php)
-
samples/app/modules/Default/lib/view/AgaviSampleAppDefaultBaseView.class.php (modified) (2 diffs)
-
samples/app/modules/Default/models/AgaviSampleAppPriceFinderModel.class.php (modified) (1 diff)
-
samples/app/modules/Default/templates/Master.php (deleted)
-
samples/app/modules/Default/views/Error404SuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/IndexSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/LoginErrorView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/LoginInputView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/LoginSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/LogoutSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/MenuSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/ModuleDisabledSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/SearchEngineSpamSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/Secure1SuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/Secure2SuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/SecureSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Default/views/UnavailableSuccessView.class.php (modified) (1 diff)
-
samples/app/modules/Disabled/actions/IndexAction.class.php (modified) (1 diff)
-
samples/app/modules/Disabled/cache (copied) (copied from branches/0.11/samples/app/modules/Disabled/cache)
-
samples/app/modules/Disabled/config/autoload.xml (copied) (copied from branches/0.11/samples/app/modules/Disabled/config/autoload.xml)
-
samples/app/modules/Disabled/config/module.xml (modified) (1 diff)
-
samples/app/modules/Disabled/lib (copied) (copied from branches/0.11/samples/app/modules/Disabled/lib)
-
samples/app/modules/Disabled/lib/action (copied) (copied from branches/0.11/samples/app/modules/Disabled/lib/action)
-
samples/app/modules/Disabled/lib/action/AgaviSampleAppDisabledBaseAction.class.php (copied) (copied from branches/0.11/samples/app/modules/Disabled/lib/action/AgaviSampleAppDisabledBaseAction.class.php)
-
samples/app/modules/Disabled/lib/model (copied) (copied from branches/0.11/samples/app/modules/Disabled/lib/model)
-
samples/app/modules/Disabled/lib/model/AgaviSampleAppDisabledBaseModel.class.php (copied) (copied from branches/0.11/samples/app/modules/Disabled/lib/model/AgaviSampleAppDisabledBaseModel.class.php)
-
samples/app/modules/Disabled/lib/view (copied) (copied from branches/0.11/samples/app/modules/Disabled/lib/view)
-
samples/app/modules/Disabled/lib/view/AgaviSampleAppDisabledBaseView.class.php (copied) (copied from branches/0.11/samples/app/modules/Disabled/lib/view/AgaviSampleAppDisabledBaseView.class.php)
-
samples/app/modules/Disabled/validate (copied) (copied from branches/0.11/samples/app/modules/Disabled/validate)
-
samples/app/modules/Disabled/views/IndexSuccessView.class.php (modified) (1 diff)
-
samples/app/templates/Master.php (copied) (copied from branches/0.11/samples/app/templates/Master.php)
-
src/build.xml (modified) (2 diffs)
-
src/buildtools/code_templates/config/action_filters.xml (modified) (1 diff)
-
src/buildtools/code_templates/config/databases.xml (modified) (1 diff)
-
src/buildtools/code_templates/config/factories.xml (modified) (1 diff)
-
src/buildtools/code_templates/config/global_filters.xml (modified) (1 diff)
-
src/buildtools/code_templates/config/output_types.xml (modified) (1 diff)
-
src/buildtools/code_templates/config/settings.xml.tmpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r2369 r2371 19 19 --------------------------- 20 20 21 CHG: Bring sample app and code templates up to date (#719) (David) 21 22 CHG: Update timezone database to 2008a (#727) (David) 22 23 CHG: List of matches for a route should be populated by the time onMatched() is called on a callback (#730) (David) -
trunk/samples/app/config/action_filters.xml
r2144 r2371 2 2 <configurations xmlns="http://agavi.org/agavi/1.0/config"> 3 3 4 <configuration environment="development " context="web">4 <configuration environment="development.*" context="web"> 5 5 <filters> 6 6 -
trunk/samples/app/config/autoload.xml
r1964 r2371 3 3 <configuration> 4 4 <autoloads> 5 <autoload name="AgaviSampleAppBaseAction">%core.lib_dir%/action/AgaviSampleAppBaseAction.class.php</autoload> 6 <autoload name="AgaviSampleAppBaseModel">%core.lib_dir%/model/AgaviSampleAppBaseModel.class.php</autoload> 7 <autoload name="AgaviSampleAppBaseView">%core.lib_dir%/view/AgaviSampleAppBaseView.class.php</autoload> 8 5 9 <autoload name="AgaviSampleAppLanguageRoutingCallback">%core.lib_dir%/routing/AgaviSampleAppLanguageRoutingCallback.class.php</autoload> 6 10 -
trunk/samples/app/config/databases.xml
r1964 r2371 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <configurations xmlns="http://agavi.org/agavi/1.0/config"> 3 3 4 <configuration> 4 <databases default="postgres"> 5 <database name="postgres" class="AgaviPostgresqlDatabase"> 6 <parameters> 7 <parameter name="host">localhost</parameter> 8 <parameter name="username">username</parameter> 9 <parameter name="password">passphrase</parameter> 10 <parameter name="database">sample</parameter> 11 </parameters> 5 <databases default="pdo_mysql_main"> 6 7 <database name="pdo_mysql_main" class="AgaviPdoDatabase"> 8 <parameter name="dsn">mysql:host=localhost;dbname=agsmplapp</parameter> 9 <parameter name="username">root</parameter> 10 <parameter name="password"></parameter> 12 11 </database> 13 <!-- 14 <database name="propel" class="AgaviPropelDatabase"> 15 <parameters> 16 <parameter name="config">%core.app_dir%/config/project-conf.php</parameter> 17 </parameters> 12 13 <database name="propelom" class="AgaviPropelDatabase"> 14 <parameter name="config">%core.app_dir%/config/project-conf.php</parameter> 18 15 </database> 19 --> 16 20 17 </databases> 21 18 </configuration> 19 20 <configuration environment="development-joecool"> 21 <databases default="pdo_mysql_main"> 22 23 <database name="pdo_mysql_main"> 24 <parameter name="dsn">mysql:host=localhost;dbname=agavisample</parameter> 25 <parameter name="username">agavisample</parameter> 26 <parameter name="password">123qwe</parameter> 27 </database> 28 29 </databases> 30 </configuration> 31 22 32 </configurations> -
trunk/samples/app/config/factories.xml
r1964 r2371 40 40 </configuration> 41 41 42 <configuration context="web" environment="development ">42 <configuration context="web" environment="development.*"> 43 43 44 44 <response class="AgaviWebResponse"> -
trunk/samples/app/config/output_types.xml
r1964 r2371 25 25 <layer name="decorator"> 26 26 <slot name="menu" module="Default" action="Menu" /> 27 <parameter name="directory">%core.template_dir%</parameter> 27 28 <parameter name="template">Master</parameter> 28 29 </layer> -
trunk/samples/app/config/settings.xml
r2284 r2371 42 42 <setting name="available">true</setting> 43 43 <setting name="debug">false</setting> 44 <setting name="modpub">/modpub</setting>45 44 46 45 <setting name="use_database">false</setting> … … 57 56 </configuration> 58 57 59 <configuration environment="development ">58 <configuration environment="development.*"> 60 59 <settings> 61 60 <setting name="debug">true</setting> -
trunk/samples/app/config/translation.xml
r1964 r2371 78 78 </configuration> 79 79 80 <configuration environment="development ">80 <configuration environment="development.*"> 81 81 <translators default_domain="default"> 82 82 <translator domain="default"> -
trunk/samples/app/modules/Default/config/autoload.xml
r1964 r2371 4 4 <autoloads> 5 5 <autoload name="AgaviSampleAppDefaultBaseAction">%core.module_dir%/Default/lib/action/AgaviSampleAppDefaultBaseAction.class.php</autoload> 6 6 <autoload name="AgaviSampleAppDefaultBaseModel">%core.module_dir%/Default/lib/model/AgaviSampleAppDefaultBaseModel.class.php</autoload> 7 7 <autoload name="AgaviSampleAppDefaultBaseView">%core.module_dir%/Default/lib/view/AgaviSampleAppDefaultBaseView.class.php</autoload> 8 8 </autoloads> -
trunk/samples/app/modules/Default/config/module.xml
r1964 r2371 3 3 <configuration> 4 4 <enabled>On</enabled> 5 <title>Default Agavi Module</title>6 <version> 0.1</version>5 <title>Default Agavi Sample App Module</title> 6 <version>1.0</version> 7 7 <name>Default</name> 8 8 <authors> 9 <author> Sean Kerr (skerr@mojavi.org)</author>9 <author>David Zülke</author> 10 10 </authors> 11 11 <homepage>http://www.agavi.org</homepage> -
trunk/samples/app/modules/Default/lib/action/AgaviSampleAppDefaultBaseAction.class.php
r1784 r2371 1 1 <?php 2 2 3 class AgaviSampleAppDefaultBaseAction extends Agavi Action3 class AgaviSampleAppDefaultBaseAction extends AgaviSampleAppBaseAction 4 4 { 5 5 /* 6 This is the base action all your application's actions should extend.7 This way, you can easily inject new functionality into all of youractions.6 This is the base action all your module's actions should extend. This way, 7 you can easily inject new functionality into all of this module's actions. 8 8 9 One example would be to extend the initialize() method and assign commonly 10 used objects such as the request as protected class members. 11 12 Another example would be a custom isSimple() method that returns true if the 13 current container has the "is_slot" parameter set - that way, all actions 14 run as a slot would automatically be switched to "simple" mode. 9 One example would be to extend the getCredentials() method and return a list 10 of credentials that all actions in this module require. 15 11 16 12 Even if you don't need any of the above and this class remains empty, it is 17 13 strongly recommended you keep it. There shall come the day where you are 18 14 happy to have it this way ;) 15 16 It is of course highly recommended that you change the names of any default 17 base classes to carry a prefix and have an overall meaningful naming scheme. 18 You can enable the usage of the respective custom template files via 19 build.properties settings. Also, keep in mind that you can define templates 20 for specific modules in case you require this. 19 21 */ 20 22 } -
trunk/samples/app/modules/Default/lib/view/AgaviSampleAppDefaultBaseView.class.php
r1784 r2371 1 1 <?php 2 2 3 class AgaviSampleAppDefaultBaseView extends Agavi View3 class AgaviSampleAppDefaultBaseView extends AgaviSampleAppBaseView 4 4 { 5 5 /* 6 This is the base view all your application's views should extend.7 This way, you can easily inject new functionality into all of yourviews.6 This is the base view all your module's views should extend. This way, 7 you can easily inject new functionality into all of this module's views. 8 8 9 One example would be to extend the initialize() method and assign commonly10 used objects such as the request as protected class members.9 One example would be to extend a setupHtml() method and assign attributes 10 that many templates in this module use. 11 11 12 12 Even if you don't need any of the above and this class remains empty, it is … … 14 14 happy to have it this way ;) 15 15 16 This default implementation throws an exception if execute() is called, 17 which means that no execute*() method specific to the current output type 18 was declared in your view, and no such method exists in this class either. 16 It is of course highly recommended that you change the names of any default 17 base classes to carry a prefix and have an overall meaningful naming scheme. 18 You can enable the usage of the respective custom template files via 19 build.properties settings. Also, keep in mind that you can define templates 20 for specific modules in case you require this. 19 21 */ 20 21 public final function execute(AgaviRequestDataHolder $rd)22 {23 throw new AgaviViewException(sprintf(24 'The View "%1$s" does not implement an "execute%3$s()" method to serve '.25 'the Output Type "%2$s", and the base View "%4$s" does not implement an '.26 '"execute%3$s()" method to handle this situation.',27 get_class($this),28 $this->container->getOutputType()->getName(),29 ucfirst(strtolower($this->container->getOutputType()->getName())),30 get_class()31 ));32 }33 34 public function executeHtml(AgaviRequestDataHolder $rd)35 {36 throw new AgaviViewException(sprintf(37 'The View "%1$s" does not implement an "execute%3$s()" method to serve '.38 'the Output Type "%2$s". It is recommended that you change the code of '.39 'the method "execute%3$s()" in the base View "%4$s" that is throwing '.40 'this exception to deal with this situation in a more appropriate '.41 'way, for example by forwarding to the default 404 error action, or by '.42 'showing some other meaningful error message to the user which explains '.43 'that the operation was unsuccessful beacuse the desired Output Type is '.44 'not implemented.',45 get_class($this),46 $this->container->getOutputType()->getName(),47 ucfirst(strtolower($this->container->getOutputType()->getName())),48 get_class()49 ));50 }51 52 public function executeXhtml(AgaviRequestDataHolder $rd)53 {54 if(method_exists($this, 'executeHtml')) {55 return $this->executeHtml($rd);56 } else {57 return $this->execute($rd);58 }59 }60 61 public function setupHtml(AgaviRequestDataHolder $rd, $layoutName = null)62 {63 $this->loadLayout($layoutName);64 65 // also set a default title just to avoid warnings66 $this->setAttribute('title', '');67 }68 22 } 69 23 -
trunk/samples/app/modules/Default/models/AgaviSampleAppPriceFinderModel.class.php
r1096 r2371 1 1 <?php 2 2 3 class AgaviSampleAppPriceFinderModel extends Agavi Model implements AgaviISingletonModel3 class AgaviSampleAppPriceFinderModel extends AgaviSampleAppDefaultBaseModel implements AgaviISingletonModel 4 4 { 5 5 public function getPriceByProductName($productName) -
trunk/samples/app/modules/Default/views/Error404SuccessView.class.php
r2259 r2371 19 19 public function executeHtml(AgaviRequestDataHolder $rd) 20 20 { 21 parent::setupHtml($rd);21 $this->setupHtml($rd); 22 22 23 23 // set the title -
trunk/samples/app/modules/Default/views/IndexSuccessView.class.php
r2259 r2371 19 19 public function executeHtml(AgaviRequestDataHolder $rd) 20 20 { 21 parent::setupHtml($rd);21 $this->setupHtml($rd); 22 22 23 23 // set the title -
trunk/samples/app/modules/Default/views/LoginErrorView.class.php
r2259 r2371 18 18 public function executeHtml(AgaviRequestDataHolder $rd) 19 19 { 20 parent::setupHtml($rd);20 $this->setupHtml($rd); 21 21 22 22 // set the title -
trunk/samples/app/modules/Default/views/LoginInputView.class.php
r2259 r2371 18 18 public function executeHtml(AgaviRequestDataHolder $rd) 19 19 { 20 parent::setupHtml($rd);20 $this->setupHtml($rd); 21 21 22 22 // set the title -
trunk/samples/app/modules/Default/views/LoginSuccessView.class.php
r2259 r2371 33 33 } 34 34 35 parent::setupHtml($rd);35 $this->setupHtml($rd); 36 36 37 37 // set the title -
trunk/samples/app/modules/Default/views/LogoutSuccessView.class.php
r2259 r2371 19 19 public function executeHtml(AgaviRequestDataHolder $rd) 20 20 { 21 parent::setupHtml($rd);21 $this->setupHtml($rd); 22 22 23 23 // set the title -
trunk/samples/app/modules/Default/views/MenuSuccessView.class.php
r2259 r2371 19 19 public function executeHtml(AgaviRequestDataHolder $rd) 20 20 { 21 parent::setupHtml($rd, 'slot'); 21 // will automatically load "slot" layout for us 22 $this->setupHtml($rd); 22 23 23 24 // set the title -
trunk/samples/app/modules/Default/views/ModuleDisabledSuccessView.class.php
r2259 r2371 18 18 public function executeHtml(AgaviRequestDataHolder $rd) 19 19 { 20 parent::setupHtml($rd);20 $this->setupHtml($rd); 21 21 22 22 // set the title -
trunk/samples/app/modules/Default/views/SearchEngineSpamSuccessView.class.php
r1964 r2371 10 10 public function executeHtml(AgaviRequestDataHolder $rd) 11 11 { 12 parent::setupHtml($rd);12 $this->setupHtml($rd); 13 13 14 14 // set the title -
trunk/samples/app/modules/Default/views/Secure1SuccessView.class.php
r1784 r2371 6 6 public function executeHtml(AgaviRequestDataHolder $rd) 7 7 { 8 parent::setupHtml($rd);8 $this->setupHtml($rd); 9 9 10 10 // set the title -
trunk/samples/app/modules/Default/views/Secure2SuccessView.class.php
r1784 r2371 5 5 public function executeHtml(AgaviRequestDataHolder $rd) 6 6 { 7 parent::setupHtml($rd);7 $this->setupHtml($rd); 8 8 9 9 // set the title -
trunk/samples/app/modules/Default/views/SecureSuccessView.class.php
r2259 r2371 18 18 public function executeHtml(AgaviRequestDataHolder $rd) 19 19 { 20 parent::setupHtml($rd);20 $this->setupHtml($rd); 21 21 22 22 // set the title -
trunk/samples/app/modules/Default/views/UnavailableSuccessView.class.php
r2259 r2371 18 18 public function executeHtml(AgaviRequestDataHolder $rd) 19 19 { 20 parent::setupHtml($rd);20 $this->setupHtml($rd); 21 21 22 22 // set the title -
trunk/samples/app/modules/Disabled/actions/IndexAction.class.php
r1784 r2371 1 1 <?php 2 2 3 class Disabled_IndexAction extends Agavi Action3 class Disabled_IndexAction extends AgaviSampleAppDisabledBaseAction 4 4 { 5 5 /** -
trunk/samples/app/modules/Disabled/config/module.xml
r1964 r2371 2 2 <configurations> 3 3 <configuration> 4 <enabled>O ff</enabled>5 <title>D isabled AgaviModule</title>6 <version> </version>4 <enabled>On</enabled> 5 <title>Dsiabled Agavi Sample App Module</title> 6 <version>1.0</version> 7 7 <name>Disabled</name> 8 8 <authors> 9 <author> </author>9 <author>David Zülke</author> 10 10 </authors> 11 <homepage> </homepage>11 <homepage>http://www.agavi.org</homepage> 12 12 <update_url></update_url> 13 <description> </description>13 <description>An example module that is disabled for demonstration purposes</description> 14 14 </configuration> 15 15 </configurations> -
trunk/samples/app/modules/Disabled/views/IndexSuccessView.class.php
