I'm not confident that I know what I am doing with the Events System so I'm 
stepping away from it for now till I fully understand the concept of 
'decoupled' functions.

I mistakenly started using it thinking the Observer Pattern was a way to 
run jobs separate from the main request cycle, i.e. send a separate request 
to generate some PDFs and then email them out without delaying the current 
view from rendering.

I will however paste an overview of how I included Events in my app.  As 
you can see from my original post I did not know where to create the file 
which contained my listeners, or how to then attach the listeners to my 
app.  

With the help of Ceeram, JoseZap and a few others in the IRC room I ended 
up with the following:

http://bin.cakephp.org/view/1872394828 

For an understanding of why I named the event Controller.Blog.afterAdd read 
the documentation:
http://book.cakephp.org/2.0/en/core-libraries/events.html 

Please note: You will need to clone latest version of Cake2.1 as last week 
a bug was fixed so App::import would recognise folders you create in /app.

HTH, Paul.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to