-- Ralf Eggert <[email protected]> wrote
(on Friday, 21 September 2012, 09:25 PM +0200):
> within ZF1 I created my own library which was located in
> /library/Travello/ parallel to /library/Zend/. In my library I had
> additional filters or validators, general view helpers or extensions for
> some classes like the action controller or the response object.
> 
> ZF2 now has modules. It is quite easy to add all these classes to a
> module. Stuff that I only need in my application can go to to the
> /module/Application/src/ directory.
> 
> But how about stuff that I might want to use in different projects?
> 
> a) Should this go to a module in the /vendor/ directory which has the
>    Module.php located at /vendor/travello/Library/Module.php

Do this. But it doesn't have to be a module. If it's library code, it's
library code. You can setup a custom packagist repo for your own
libraries, and use that in your project composer.json so that you can
install such libraries and keep them up-to-date easily.

> b) Since the ZF2 is no module (Module.php is missing), I could build
>    my extension in the same way that
>    /vendor/zendframework/zendframework/ is set up?
> 
> I think I would prefer a). What do others think about this?

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to