cakephp-2.1

Where to register event listeners

女生的网名这么多〃 提交于 2019-11-27 11:18:54
问题 I'm trying to use the Event System in CakePHP v2.1+ It appears to be quite powerful, but the documentation is somewhat vague. Triggering the event seems pretty straight-forward, but I'm not sure how to register the corresponding listener(s) to listen for the event. The relevant section is here and it offers the following example code: App::uses('CakeEventListener', 'Event'); class UserStatistic implements CakeEventListener { public function implementedEvents() { return array( 'Model.Order

CakePHP 2.x Auth with Two Separate Logins

社会主义新天地 提交于 2019-11-27 10:39:13
问题 Back in May, I posted this question. I'm trying to do the same thing again on a different app, but I haven't found a solution to this problem. I do have more information and better code, so I'm hoping you guys can help me sort this out. Use Case: Doctor's office has a website with admin users. The users login successfully with CakePHP's Auth via User model and UsersController . Doctors have referring physicians with completely different profiles and actions. Doctors need to login via example

Using Oracle database with CakePHP 2.0

自作多情 提交于 2019-11-27 07:03:41
问题 I have noticed there's no datasource for Oracle in CakePHP 2.0 for the moment, although it seems they are working on in it now: http://ask.cakephp.org/questions/view/any_news_about_oracle_datasource_with_cakephp_2_0 There are some people explaining how to use an Oracle DB adapting some code from CakePHP 1.3: http://www.hassanbakar.com/2012/01/09/using-oracle-in-cakephp-2-0/ http://liamgraham.wordpress.com/2007/04/19/using-oracle-with-cakephp-15-minute-blog-tutorial/ But I'm not sure that's