sfPropelGeneratorExtensionPlugin
0.1.0beta
for sf 1.2 and Propel
MIT
This plugin makes extending Propels generators easier by adding sfMixer hooks to Propel generators. These are added to all functions using the SfExtended* classes.
This plugin was developed for symfony 1.2 and propel 1.3. It will probably work for propel 1.3 under earlier versions of symphony, or even earlier versions of propel, but you may have to regenerate the classes.
Image courtesy of Hiuppo.
Developers
License
Copyright (c) 2008 Merlijn van Deen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Releases for sf 1.2
| Version |
License |
API |
Released |
|
0.1.0beta
|
MIT license |
0.1.0beta
|
12/12/2008 |
Changelog for release 0.1.0 - 12/12/2008
Other releases
Release 0.1.0 - 12/12/2008
Symfony Propel Generator Extension Plugin
This plugin makes extending Propels generators easier by adding sfMixer hooks to Propel generators. These are added to all functions using the SfExtended* classes.
This plugin was developed for symfony 1.2 and propel 1.3. It will probably work for propel 1.3 under earlier versions of symphony, or even earlier versions of propel, but you may have to regenerate the classes.
Requirements
Installation
1
In propel.ini, change
; builder settings
propel.builder.peer.class = plugins.sfPropelPlugin.lib.propel.builder.SfPeerBuilder
propel.builder.object.class = plugins.sfPropelPlugin.lib.propel.builder.SfObjectBuilder
propel.builder.objectstub.class = plugins.sfPropelPlugin.lib.propel.builder.SfExtensionObjectBuilder
propel.builder.peerstub.class = plugins.sfPropelPlugin.lib.propel.builder.SfExtensionPeerBuilder
propel.builder.objectmultiextend.class = plugins.sfPropelPlugin.lib.propel.builder.SfMultiExtendObjectBuilder
propel.builder.mapbuilder.class = plugins.sfPropelPlugin.lib.propel.builder.SfMapBuilderBuilder
to
; builder settings
propel.builder.peer.class = plugins.sfPropelGeneratorExtensionPlugin.lib.sfExtendedPeerBuilder
propel.builder.object.class = plugins.sfPropelGeneratorExtensionPlugin.lib.sfExtendedObjectBuilder
propel.builder.objectstub.class = plugins.sfPropelGeneratorExtensionPlugin.lib.sfExtendedExtensionObjectBuilder
propel.builder.peerstub.class = plugins.sfPropelGeneratorExtensionPlugin.lib.sfExtendedExtensionPeerBuilder
propel.builder.objectmultiextend.class = plugins.sfPropelGeneratorExtensionPlugin.lib.sfExtendedMultiExtendObjectBuilder
propel.builder.mapbuilder.class = plugins.sfPropelGeneratorExtensionPlugin.lib.sfExtendedMapBuilderBuilder
2
Add sfMixer hooks to config/sfExtendedPropelGenerator.conf.php, for example:
function test($object, &$script) { $script .= "/* Comment in all object files */";}
sfMixer::register('SfObjectBuilder:addIncludes:pre', 'test');
will add
/* Comment in all object files */
at the first line of all your Base classes. The call signature of the hooks is the generator object, followed by all parameters of the original function.
For information about available hooks, see the lib/sfExtended* source files.
Generated files
The files in the lib/ directory are autogenerated by tools/generateExtendedClasses.php. This generator reads the original source files and processes all protected function. To get other groups of functions covered, change this file.
Credits
sfPropelGeneratorExtensionPlugin was written by Merlijn van Deen. He can be contacted at valhallasw@gmail.com.