[fw-general] The Module Class - Sample Usage of “loadModules.post” Event
Hi, http://framework.zend.com/manual/2.0/en/modules/zend.module-manager.module-class.html http://framework.zend.com/manual/2.0/en/modules/zend.module-manager.module-class.html may in the doc in place of public function modulesLoaded(Event $e) { // This method is called once all modules are loaded. $moduleManager = $e-getTarget(); $loadedModules = $moduleManager-getLoadedModules(); // To get the configuration from another module named 'FooModule' $config = $moduleManager-getModule('FooModule')-getConfig(); } it will be better public function modulesLoaded(Event $e) { // This method is called once all modules are loaded. $moduleManager = $e-getTarget(); $loadedModules = $moduleManager-getLoadedModules(); // To get the configuration from another module named 'FooModule' $config = $moduleManager-getModule('Foo)-getConfig(); } just half an hour to figure it out :) Bye -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/The-Module-Class-Sample-Usage-of-loadModules-post-Event-tp4658948.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com
Re: [fw-general] The Module Class - Sample Usage of “loadModules.post” Event
Consider opening a Pull Request against https://github.com/zendframework/zf2-documentation Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 4 February 2013 11:55, whisher whishe...@gmail.com wrote: Hi, http://framework.zend.com/manual/2.0/en/modules/zend.module-manager.module-class.html http://framework.zend.com/manual/2.0/en/modules/zend.module-manager.module-class.html may in the doc in place of public function modulesLoaded(Event $e) { // This method is called once all modules are loaded. $moduleManager = $e-getTarget(); $loadedModules = $moduleManager-getLoadedModules(); // To get the configuration from another module named 'FooModule' $config = $moduleManager-getModule('FooModule')-getConfig(); } it will be better public function modulesLoaded(Event $e) { // This method is called once all modules are loaded. $moduleManager = $e-getTarget(); $loadedModules = $moduleManager-getLoadedModules(); // To get the configuration from another module named 'FooModule' $config = $moduleManager-getModule('Foo)-getConfig(); } just half an hour to figure it out :) Bye -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/The-Module-Class-Sample-Usage-of-loadModules-post-Event-tp4658948.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com
Re: [fw-general] Weird problem with Rbac for ZF 2.1.0
Top posting -- sorry... So, there was a patch applied around 2 months ago surrounding role inheritance that, on later examination, proved to be incorrect in terms of both expected usage as well as typical implementation of RBAC. As such, Kyle had the patch reverted around a week before the release. Hopefully he can shed some more light on it; from what I know, though, the documentation shows the current implementation as released. On Sun, Feb 3, 2013 at 3:15 PM, Ralf Eggert r.egg...@travello.de wrote: a couple of weeks ago, I wrote a little test script to demonstrate the Zend\Permissions\Rbac component. It worked as expected with the 2.1.0-dev version I used. After rechecking the script with 2.1.0 now, the results have changed. Here is the script for copy / pasting: use Zend\Debug\Debug; use Zend\Permissions\Rbac\Rbac; use Zend\Permissions\Rbac\Role; $roleGuest = new Role('guest'); $roleGuest-addPermission('pizza_list'); $roleGuest-addPermission('pizza_show'); $roleCustomer = new Role('customer'); $roleCustomer-addPermission('pizza_basket'); $roleCustomer-addPermission('order_create'); $roleCustomer-addPermission('order_send'); $roleCustomer-setParent($roleGuest); $roleStaff = new Role('staff'); $roleStaff-addPermission('pizza_create'); $roleStaff-addPermission('pizza_update'); $roleStaff-addPermission('order_update'); $roleStaff-addPermission('order_cancel'); $roleStaff-addPermission('order_finish'); $roleStaff-setParent($roleCustomer); $roleAdmin = new Role('admin'); $roleAdmin-addPermission('pizza_delete'); $roleAdmin-addPermission('order_delete'); $roleAdmin-setParent($roleStaff); $rbac = new Rbac(); $rbac-addRole($roleGuest); $rbac-addRole($roleCustomer); $rbac-addRole($roleStaff); $rbac-addRole($roleAdmin); Debug::dump($rbac-isGranted('guest', 'pizza_list')); Debug::dump($rbac-isGranted('customer', 'pizza_basket')); Debug::dump($rbac-isGranted('customer', 'pizza_list')); Debug::dump($rbac-isGranted('staff', 'pizza_list')); Debug::dump($rbac-isGranted('staff', 'order_cancel')); Debug::dump($rbac-isGranted('admin', 'pizza_delete')); Debug::dump($rbac-isGranted('admin', 'order_create')); Debug::dump($rbac-isGranted('guest', 'pizza_create')); Debug::dump($rbac-isGranted('customer', 'order_finish')); Debug::dump($rbac-isGranted('staff', 'order_delete')); Debug::dump($rbac-isGranted('admin', 'order_copy')); With the 2.1.0-dev release the first seven Dumps showed true and the last four showed false. Now only the first, second, fifth and sixth show true, all other show false. My feelings are that the parent inheritance is not working any more. So, the customer is not inheriting the pizza_list right from the guest. Could any one explain, what happened? Regards, Ralf -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com -- Matthew Weier O'Phinney Project Lead| matt...@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com
Re: [fw-general] Re: What happened to Zend/Markup?
On Sun, Feb 3, 2013 at 1:15 PM, Marco Pivetta ocram...@gmail.com wrote: It is kicked out from the main repo, mainly because it lacks maintainers. This happened to a whole lot of ZF1 components which were ported to ZF2-style namespaces and didn't find an active maintainer. More than that, actually: we removed it from 1.12.1 as well, as the implementation was not only unmaintained, but buggy and potentially a security vector. There are a lot of libraries out there for doing markup conversion, and many are on Composer at this time, which makes them fairly trivial to consume from within the framework. Removing our implementation helps direct developers to these more robust solutions. On 3 February 2013 17:47, BRampersad [via Zend Framework Community] ml-node+s634137n465893...@n4.nabble.com wrote: Hi, Is Zend/Markup getting phased out of the core lib and will only be provided as a 3rd party module? https://github.com/zendframework/ZendMarkup/tree/master/library/ZendMarkup It was changed from Zend/Markup to ZendMarkup which suggests that it can't be dropped in place into the Zend library. Or is this only a temp thing until it gets completely refactored then which it can be included in the core package? Thanks -- If you reply to this email, your message will be added to the discussion below: http://zend-framework-community.634137.n4.nabble.com/What-happened-to-Zend-Markup-tp4658935.html To start a new topic under Zend Framework, email ml-node+s634137n634138...@n4.nabble.com To unsubscribe from Zend Framework Community, click herehttp://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=634137code=b2NyYW1pdXNAZ21haWwuY29tfDYzNDEzN3wxNzE0OTI1MTk4 . NAMLhttp://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/What-happened-to-Zend-Markup-tp4658935p4658936.html Sent from the Zend Framework mailing list archive at Nabble.com. -- Matthew Weier O'Phinney Project Lead| matt...@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com
Re: [fw-general] Weird problem with Rbac for ZF 2.1.0
Hi Matthew, thanks for clarification. The solution for this change is quite simple if I want to get the same result as before. I only need to change the setParent() calls to addChild() calls. Then the guest is a child of customer and the customer inherits the rights from the guest. So it is just the other way around. Regards, Ralf -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com
[fw-general] Re: No adapter found for Zend_Db_Table Error
Thanks for the reply. I just tried your suggestion and I'm still getting the 'no adapter found for Zend_Db_Table' error. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/No-adapter-found-for-Zend-Db-Table-Error-tp4658934p4658963.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com
[fw-general] Can't load my form class
Hi guys, I'm having an annoying problem with not being able to load a form class, this is the contents of the class (application/forms/DateSelect.php): http://bin.cakephp.org/view/1945076439 http://bin.cakephp.org/view/1945076439 This is the Bootstrap.php file (application/Bootstrap.php): http://bin.cakephp.org/view/527585082 http://bin.cakephp.org/view/527585082 If you want to see other files, let me know. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Can-t-load-my-form-class-tp4658969.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com
[fw-general] Re: No adapter found for Zend_Db_Table Error
@ samsonasik I just came across a thread where someone has a similar issue and I just updated the file Usermapper.php with the following code: protected $_dbTable; public function __construct() { $parameters =array( 'host' = 'localhost', 'username' = 'root', 'password' = '', 'dbname' = 'memberinfo', 'adapter' = 'Pdo_Mysql' ); try { *$db = Zend_Db::factory('Pdo_Mysql', new Zend_Config($parameters));* $db-getConnection(); } catch (Zend_Db_Adapter_Exception $e) { } catch (Zend_Exception $e) { } *Zend_Db_Table::setDefaultAdapter($db); $this-_dbTable = new Register_Model_DbTable_User();* } ..where I save the connection to _dbTable variable and I'm still getting the same result. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/No-adapter-found-for-Zend-Db-Table-Error-tp4658934p4658974.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com