Re: [fw-general] ZF2 create own library

2012-09-21 Thread Matthew Weier O'Phinney
-- Ralf Eggert wrote (on Friday, 21 September 2012, 10:59 PM +0200): > Hi, > > I have another issue which is related to composer. I guess it is not > really a ZF specific issue, but since others probably have done the same > maybe someone could help me. > > I have a repository on github https://

Re: [fw-general] Re: ZF2 create own library

2012-09-21 Thread Ludwig Ruderstaller
Hi Ralf, Maybe I can help you this time :-) On 21.09.2012 22:24, Ralf Eggert wrote: > return array( > 'modules' => array( > 'Application', > 'travello', > ), > 'module_listener_options' => array( > 'config_glob_paths'=> array( > 'config/autoload

[fw-general] Re: ZF2 How to change template directory

2012-09-21 Thread luk
Distrust wrote > I want to setup the following skin directory structure: > > module/Application/view/ >- default >- application >- index >- index.phtml >- test >- index.phtml >- something-else.phtml >- blue >

Re: [fw-general] ZF2 create own library

2012-09-21 Thread Matthew Weier O'Phinney
-- Ralf Eggert wrote (on Friday, 21 September 2012, 10:26 PM +0200): > > 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 > > instal

Re: [fw-general] Re: ZF2 create custom filter

2012-09-21 Thread Matthew Weier O'Phinney
-- Ralf Eggert wrote (on Friday, 21 September 2012, 10:29 PM +0200): > > > Again the big question is where to add this line? > > > > > > - Module::onBootstrap() > > > > I'd vote for this one. > > Ok, good to know. But if I want to use my custom filters within a > InputFilter object, I wonder if

[fw-general] Re: Dependincy Injector... can't find instance

2012-09-21 Thread poashoas
Thanks for all the replies One mistake somewhere in the DI f*cks everything up. AND,.. I had to make an autoload_classmap, helps a lot AND, ... I had to refactor some zend classnames and put some dependencies like: 'di' => array( 'allowed_controllers' => array( 'Login\Controller\F

Re: [fw-general] ZF2 create own library

2012-09-21 Thread Ralf Eggert
Hi, I have another issue which is related to composer. I guess it is not really a ZF specific issue, but since others probably have done the same maybe someone could help me. I have a repository on github https://github.com/RalfEggert/travello and cloned it to my project at /vendor/ralfeggert/tra

[fw-general] Re: ZF2 create own library

2012-09-21 Thread luk
Ralf Eggert wrote > I created /vendor/ralfeggert/travello/ now which holds a simple > Module.php which just outputs a text to check the module loading. > > My /config/application.config.php looks like this: > > -- > return array( >

Re: [fw-general] Re: ZF2 create custom filter

2012-09-21 Thread Ralf Eggert
Hi Matthew >> Again the big question is where to add this line? >> >> - Module::onBootstrap() > > I'd vote for this one. Ok, good to know. But if I want to use my custom filters within a InputFilter object, I wonder if they are found. Need to check that. Regards, Ralf -- List: fw-general@lis

Re: [fw-general] ZF2 create own library

2012-09-21 Thread Ralf Eggert
Hi Matthew, > 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. But I guess a

Re: [fw-general] Re: ZF2 create own library

2012-09-21 Thread Ralf Eggert
Hi Luke, Thanks for your reply. > My recommendation is the first option you've pointed out. It''s very > flexible in terms of reusing stuff. > I'm using sub namespaces for my vendor common Modules. I have it structured > like that: vendor/BS/ModuleName1, vendor/BS/ModuleName2, etc. > In my applic

[fw-general] Re: ZF2 create custom filter

2012-09-21 Thread luk
Ralf Eggert wrote > Hi Luke, > >> I think in your case it does make sense to call that custom Filter in >> your >> Service class as you've mentioned. I would do it this way. > > A couple of minutes ago I found Zend\Filter\StaticFilter which uses in > instance of Zend\Filter\FilterPluginManager. I

Re: [fw-general] ZF2 create own library

2012-09-21 Thread Matthew Weier O'Phinney
-- Ralf Eggert 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 ac

Re: [fw-general] Re: ZF2 create custom filter

2012-09-21 Thread Matthew Weier O'Phinney
-- Ralf Eggert wrote (on Friday, 21 September 2012, 09:35 PM +0200): > > I think in your case it does make sense to call that custom Filter in your > > Service class as you've mentioned. I would do it this way. > > A couple of minutes ago I found Zend\Filter\StaticFilter which uses in > instance

[fw-general] Zend Framework 2.0.2 Released

2012-09-21 Thread Matthew Weier O'Phinney
The Zend Framework community is pleased to announce the immediate availability of Zend Framework 2.0.2! Packages and installation instructions are available at: http://framework.zend.com/downloads/latest This release fixes an issue in the "Router" service that was affecting URL generation, am

[fw-general] Re: ZF2 create own library

2012-09-21 Thread luk
Ralf Eggert wrote > Hi, > > 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. >

Re: [fw-general] Re: ZF2 create custom filter

2012-09-21 Thread Ralf Eggert
Hi Luke, > I think in your case it does make sense to call that custom Filter in your > Service class as you've mentioned. I would do it this way. A couple of minutes ago I found Zend\Filter\StaticFilter which uses in instance of Zend\Filter\FilterPluginManager. I am curious how to add my custom

[fw-general] ZF2 create own library

2012-09-21 Thread Ralf Eggert
Hi, 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

[fw-general] Re: ZF2 create custom filter

2012-09-21 Thread luk
Ralf Eggert wrote > Hi, > > in an entity I have the title column. A value could be: > > This is my "stupid" text with spécial chars!!! > > This entity has an url column. This should take the value from the title > in a converted way like this: > > this-is-my-stupid-text-with-special-chars >

[fw-general] Re: Dependincy Injector... can't find instance

2012-09-21 Thread developer10
I'm a ZF newbie, FYI. I think I read somewhere on this mail-list O'Phinney wrote there's no init() for ZF2 controllers? Could that be the source of your problem or I picked up something else? -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Dependincy-Injec

[fw-general] Re: Form element select error

2012-09-21 Thread wilariz
you have reason. I'll explain you my application context: I'm making ddd design. I have n layers. in this case only use Application and Presentation layers: in my presentation layer I have my controller classe where my action save I instance form, render and when is post.. I send form->Data() to m

[fw-general] ZF2 create custom filter

2012-09-21 Thread Ralf Eggert
Hi, in an entity I have the title column. A value could be: This is my "stupid" text with spécial chars!!! This entity has an url column. This should take the value from the title in a converted way like this: this-is-my-stupid-text-with-special-chars I think you know what I mean. Creating

Re: [fw-general] ZF2: Service Manager - best practice

2012-09-21 Thread Ludwig Ruderstaller
Hi Matthew, On 21.09.2012 16:01, Matthew Weier O'Phinney wrote: >> It seems extremly redundant to do this for each entity/form. > > Use an initializer instead. The process is quite simple: > I'd go with initializers if there's only one or two common injections, > and an abstract factory if the i

[fw-general] Re: Form element select error

2012-09-21 Thread luk
wilariz wrote > you have reason. > I'll explain you my application context: > I'm making ddd design. > I have n layers. in this case only use Application and Presentation > layers: > in my presentation layer I have my controller classe where my action save > I instance form, render and when is pos

Re: [fw-general] Dependincy Injector... can't find instance

2012-09-21 Thread Marco Pivetta
Always check $e->getPrevious() on exceptions. The skeleton application already handles that in the error view. Otherwise, use a try-catch block like that try { // buggy block } catch (\Exception $e) { do { echo $e->getMessage(); } while ($e = $e->getPrevious); } Marco Pivetta

[fw-general] Re: [zf-contributors] Zend Framework 2.0.1 Released!

2012-09-21 Thread Oscar Fanelli
Problem: Uncaught exception 'Zend\Mvc\Router\Exception\RuntimeException' with message 'Request URI has not been set' on something like: url('news', [], {'force_canonical': true}) Il giorno 20/set/2012, alle ore 23:39, Matthew Weier O'Phinney ha scritto: > The Zend Framework community is ple

[fw-general] AW: AW: WG: [ZF2][Doctrine2] Autogeneration of entity classes

2012-09-21 Thread tridem
It’s worth the waiting! Thanks in advance! J Von: Marco Pivetta [via Zend Framework Community] [mailto:ml-node+s634137n4656998...@n4.nabble.com] Gesendet: Freitag, 21. September 2012 10:18 An: tridem Betreff: Re: AW: WG: [ZF2][Doctrine2] Autogeneration of entity classes Hey tridem, I may

[fw-general] AW: WG: [ZF2][Doctrine2] Autogeneration of entity classes

2012-09-21 Thread tridem
Hi Luke, that is my problem. I recently started with ZF2 and followed this tutorial: http://www.jasongrimes.org/2012/01/using-doctrine-2-in-zend-framework-2/ Even the github at https://github.com/doctrine/DoctrineORMModule "only" states: "The module depends on

[fw-general] WG: [ZF2][Doctrine2] Autogeneration of entity classes

2012-09-21 Thread tridem
A short question: Where do I have to set the autoloading for Doctrine since I am getting this error: Fatal error: Class 'Doctrine\Common\Annotations\AnnotationRegistry' not found in. ? Von: Razorblade [via Zend Framework Community] [mailto:ml-node+s634137n4656924...@n4.nabble.com] Gesendet:

[fw-general] AW: AW: WG: [ZF2][Doctrine2] Autogeneration of entity classes

2012-09-21 Thread tridem
Have you found a better tutorial yet, Luk? At least everything seems to work fine so far. The only missing thing is the autoloading of Doctrine for me. Marco says: That really depends on your application. You'd usually do it in `init_autoload.php` in your application (if it follows the sk

[fw-general] Re: Form element select error

2012-09-21 Thread wilariz
luk.. now i have an error when I validate form.. my error is : haystack option is mandatory trace: #0 C:\xampp\htdocs\travelagency\vendor\zendframework\zendframework\library\Zend\Validator\InArray.php(175): Zend\Validator\InArray->getHaystack() #1 C:\xampp\htdocs\travelagency\vendor\zendframework\

Re: [fw-general] ZF2: Service Manager - best practice

2012-09-21 Thread Matthew Weier O'Phinney
-- Ludwig Ruderstaller wrote (on Friday, 21 September 2012, 12:32 PM +0200): > Hi, > > After reading much about the Service Manager implementation in ZF2 and > trying out a few things, I think I finally get the concept and the idea > behind it. > > But please help me understand one thing. > > I

Re: [fw-general] Re: ZF2 Doing something before calling the controller action

2012-09-21 Thread Matthew Weier O'Phinney
-- Distrust wrote (on Wednesday, 19 September 2012, 04:04 AM -0700): > Matus Zeman wrote > > Why can't you simply implement it inside of showSettingsAction() method? > > Because I need a universal method to initialize various elements (before > action), without duplicating my code in every other

[fw-general] Re: Form element select error

2012-09-21 Thread luk
wilariz wrote > Hi good day. well in this case select element should be load register > from a databasetable > I have a form "Register" and my select element represents "TypeRegister".. > what type of validation I should do? > this is my select element: > $this->add(array( > '

[fw-general] Re: Form element select error

2012-09-21 Thread luk
- Cheers, -- Luke Mierzwa -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Form-element-select-error-tp4656976p4657016.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend

Re: [fw-general] ZF2: i18n with Modules

2012-09-21 Thread Ralf Eggert
Hi Ludwig, > exactly my problem. i added your method to the form factory, seems to > work. but I guess next time I write a custom view helper for an form > element I will forget where I set this :-) My changeViewHelper() method is part of a module-specific listener that is triggered before event

[fw-general] Re: Form element select error

2012-09-21 Thread luk
wilariz wrote > luk.. now i have an error when I validate form.. > my error is : > haystack option is mandatory > > trace: > #0 > C:\xampp\htdocs\travelagency\vendor\zendframework\zendframework\library\Zend\Validator\InArray.php(175): > Zend\Validator\InArray->getHaystack() > #1 > C:\xampp\htdocs\

[fw-general] Re: ZF2: Service Manager - best practice

2012-09-21 Thread luk
Ludwig Ruderstaller wrote > Hi, > > After reading much about the Service Manager implementation in ZF2 and > trying out a few things, I think I finally get the concept and the idea > behind it. > > But please help me understand one thing. > > Imagine I have a medium size database with 10 entitie

[fw-general] ZF2: Service Manager - best practice

2012-09-21 Thread Ludwig Ruderstaller
Hi, After reading much about the Service Manager implementation in ZF2 and trying out a few things, I think I finally get the concept and the idea behind it. But please help me understand one thing. Imagine I have a medium size database with 10 entities. Along them are 10 form definition. The i

[fw-general] Re: [ZF2] Use Zend_Validate file in module.config.php

2012-09-21 Thread luk
Birzat wrote > Thanks Luke, > > I choose the 2nd solution. > > How to do translation in the view in error message. > > I try : echo > $this->translate($this->formElementErrors($form->get('mail'))); > > But it doesn't work. > > Do you have a idea ? I think that you don't need to do translate o

Re: [fw-general] ZF2: i18n with Modules

2012-09-21 Thread Ralf Eggert
Hi Ludwig, within my modules I set the textdomain like this: - 'translator' => array( 'translation_file_patterns' => array( array( 'type' => 'phpArray', 'base_dir'

[fw-general] Re: AW: WG: [ZF2][Doctrine2] Autogeneration of entity classes

2012-09-21 Thread Marco Pivetta
Hey tridem, I may be able to push some tags on the repo today to make it stable. That should also solve the issue, but I'll work on it in the evening. Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 21 September 2012 08:53, tridem [via Zend Framework Community] < ml-nod