Re: [fw-general] Zend\Navigation\Navigation() in getServiceConfig()

2012-09-17 Thread Jurian Sluiman
2012/9/13 Marc Tempelmeier > Hi, > > I´m struggle a bit with my Navigation.Its more code then good for an > email, therefor I put it on pastebin. I thought that the following cases > are nearly the same: > > 1. http://pastebin.com/3U6iAfw5 > 2. http://pastebin.com/9R1NNKHs > 3. http://pastebin.co

AW: [fw-general] Zend\Navigation\Navigation() in getServiceConfig()

2012-09-17 Thread Marc Tempelmeier
Hi, sorry if it is not detailed enough. I thought the three factory cases are the same. In 1. I used the default factory with navigation in the config. 2. I tried to use the factory to return my own navigation object 3. is the use of a callback to return my navigation object. I th

[fw-general] ServiceLocator in Model classes

2012-09-17 Thread Maxim Savenko
Hi, Is there are any way to get ServiceLocator or other DI manager in other classes, Model classes for example? I read "Creating a ServiceManager-aware class", It's fine, but it works only with controllers. It'd

[fw-general] module.config.php controllers

2012-09-17 Thread lode
I'm playing around with the flexibility of the modules. If I make a controller Ns\Controller\Index Then in the module config I get something like 'controllers' => array( 'invokables' => array( 'Ns\Controller\Index' => 'Ns\Controller\Index', ), ), If I remove the

[fw-general] Re: ZF2 query something

2012-09-17 Thread luk
It is not a good practice to run a query directly inside your class. I recommend you to fit your query in the model and create a mapper which can execute it. Then setup your mapper to be injected in your class, where you require it. If you need any more details please ask. poashoas wrote > > I j

[fw-general] Replacing the menu helper with custom helper for twitters bootstrap menues

2012-09-17 Thread Marc Tempelmeier
Hi, just another Navigation question :) I want to replace the menu helper of \Zend\View\Helper\Navigation with my own implementation which outputs me the correct html for twitters bootstrap menus. I narrowed it down to: public function getViewHelperConfig() { return array(

Re: [fw-general] Check ACL on routing

2012-09-17 Thread Matthew Weier O'Phinney
-- Ralf Eggert wrote (on Saturday, 15 September 2012, 11:17 AM +0200): > to clarify my last message. The ACL check does work for unknown actions. > It just doesn't work correctly for any unknown controllers. > > Currently I am thinking about using the controller loader to try to load > the contro

Re: [fw-general] ServiceLocator in Model classes

2012-09-17 Thread Matthew Weier O'Phinney
-- Maxim Savenko wrote (on Monday, 17 September 2012, 03:25 PM +0400): > Is there are any way to get ServiceLocator or other DI manager in other > classes, Model classes for example? Yes -- implement Zend\ServiceManager\ServiceLocatorAwareInterface, and then define a service for your model somew

Re: [fw-general] module.config.php controllers

2012-09-17 Thread Matthew Weier O'Phinney
-- lode wrote (on Monday, 17 September 2012, 04:36 AM -0700): > I'm playing around with the flexibility of the modules. > > If I make a controller Ns\Controller\Index > > Then in the module config I get something like > > 'controllers' => array( > 'invokables' => array( > 'N

[fw-general] Re: Custom Library

2012-09-17 Thread luk
Definitely you called wrong class again below: "Class 'Pixiebox\Resources\Whitelist\ListAcl' not found" that was not your class, it was: "Pixiebox\Resources\Acl\Whitelist as Whitelist" That's my index.php: chdir(dirname(__DIR__)); // Setup autoloading include 'init_autoloader.php'; Zend\Loader\

[fw-general] [ZF2] Injecting objects to a controller, or getting objects from the service locator?

2012-09-17 Thread Robert Basic
Hi all! I'm writing my first ZF2 controller, and am wondering about accessing other objects (models, services...) in a controller. As I see it now, there are 2 ways to do this, and both ways seem perfectly fine to me... But maybe I'm missing something I don't see, and in the long run, one way is b

Re: [fw-general] [ZF2] Injecting objects to a controller, or getting objects from the service locator?

2012-09-17 Thread Matthew Weier O'Phinney
-- Robert Basic wrote (on Monday, 17 September 2012, 04:33 PM +0200): > I'm writing my first ZF2 controller, and am wondering about accessing > other objects (models, services...) in a controller. As I see it now, > there are 2 ways to do this, and both ways seem perfectly fine to > me... But mayb

Re: [fw-general] Check ACL on routing

2012-09-17 Thread Ralf Eggert
Hi Matthew, thanks for this new idea. > I just had another idea. Use an initializer. I tried to build this but noticed that the initializer is only processed for existing controllers. But the acl check problems I have have to do with not existing controllers. Currently I used this listener meth

[fw-general] Getting started: library installed in zendframework/zendframework, vendor/ZF2 is empty dir

2012-09-17 Thread debussy007
Hi, I've been following the first steps in the "Getting Started" tutorial: http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html I downloaded the zip file of the skeleton application from github, unzipped it, and ran the commands to use Composer (self-update, install). It

Re: [fw-general] Getting started: library installed in zendframework/zendframework, vendor/ZF2 is empty dir

2012-09-17 Thread Matthew Weier O'Phinney
-- debussy007 wrote (on Monday, 17 September 2012, 10:08 AM -0700): > I've been following the first steps in the "Getting Started" tutorial: > http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html > > I downloaded the zip file of the skeleton application from github, unzip

[fw-general] Re: Getting started: library installed in zendframework/zendframework, vendor/ZF2 is empty dir

2012-09-17 Thread debussy007
But then how does the application find the library? In init_autoloader.php I have the following: /if (getenv('ZF2_PATH')) { // Support for ZF2_PATH environment variable or git submodule $zf2Path = getenv('ZF2_PATH'); } elseif (get_cfg_var('zf2_path')) { // Support for zf2_path direct

[fw-general] Re: ZF2 per route (or module) configuration

2012-09-17 Thread luk
I haven't had any issues with configuration so far and I don't think there are any that won't allow you to do what you're planning to. In case you want to have per route configuration then you would need to extend/replace Zend\Mvc\RouteListener and provide your own logic for handling route and oth

[fw-general] Re: ZF2 per route (or module) configuration

2012-09-17 Thread luk
This isn't going to work that way. You can configure your view manager's template_map to alias different templates names in each of modules you are using then for sure you won't have them overriden. Something like: in FrontendModule: 'config' => array( 'view_manager' => array( 'template_map'

[fw-general] Re: Getting started: library installed in zendframework/zendframework, vendor/ZF2 is empty dir

2012-09-17 Thread luk
debussy007 wrote > > But then how does the application find the library? > In init_autoloader.php I have the following: > > /if (getenv('ZF2_PATH')) { // Support for ZF2_PATH environment > variable or git submodule > $zf2Path = getenv('ZF2_PATH'); > } elseif (get_cfg_var('zf2_path'

[fw-general] ZF2 integer inputfilter

2012-09-17 Thread Steve Rayner
Can anyone point me to (or give me) an example of an input filter for an integer? My requirements are that we ensure the input is an integer, it is required and it must fall between and min and max values (inclusive). I can probably just about figure this out, but should i be doing things like stri

Re: [fw-general] Re: Getting started: library installed in zendframework/zendframework, vendor/ZF2 is empty dir

2012-09-17 Thread Matthew Weier O'Phinney
-- debussy007 wrote (on Monday, 17 September 2012, 10:31 AM -0700): > But then how does the application find the library? It grabs it from the composer autoloader -- which is invoked in the lines above the ones you quoted below. :) // Composer autoloading if (file_exists('vendor/autoloa

Re: [fw-general] ZF2 integer inputfilter

2012-09-17 Thread Matthew Weier O'Phinney
-- Steve Rayner wrote (on Monday, 17 September 2012, 09:54 PM +0100): > Can anyone point me to (or give me) an example of an input filter for > an integer? My requirements are that we ensure the input is an > integer, it is required and it must fall between and min and max > values (inclusive). I

[fw-general] Re: ZF2 integer inputfilter

2012-09-17 Thread luk
Steve Rayner-2 wrote > > Can anyone point me to (or give me) an example of an input filter for > an integer? My requirements are that we ensure the input is an > integer, it is required and it must fall between and min and max > values (inclusive). I can probably just about figure this out, but >