[Jifty-commit] r1737 - jifty/trunk/lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Aug 3 02:06:51 EDT 2006


Author: bartb
Date: Thu Aug  3 02:06:48 2006
New Revision: 1737

Modified:
   jifty/trunk/lib/Jifty/ClassLoader.pm

Log:
Add a small bit of doc about creating your own classes that are normally created by J::ClassLoader

Modified: jifty/trunk/lib/Jifty/ClassLoader.pm
==============================================================================
--- jifty/trunk/lib/Jifty/ClassLoader.pm	(original)
+++ jifty/trunk/lib/Jifty/ClassLoader.pm	Thu Aug  3 02:06:48 2006
@@ -222,4 +222,26 @@
     wantarray ? @{ $self->{models} ||= [] } : $self->{models};
 }
 
+
+=head1 Writing your own classes
+
+If you require more functionality than is provided by the classes
+created by ClassLoader then you should create a class with the
+appropriate name and add your extra logic to it.
+
+For example you will almost certainly want to write your own
+dispatcher, so something like:
+
+ package MyApp::Dispatcher;
+ use Jifty::Dispatcher -base;
+
+If you want to add some application specific behaviour to a model's
+collection class, say for the User model, create F<UserCollection.pm>
+in your applications Model directory.
+
+ package MyApp::Model::UserCollection;
+ use base 'MyApp::Collection';
+
+=cut
+
 1;


More information about the Jifty-commit mailing list