News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
Sanisoft.com:
Attach & detach behaviors at run-time in CakePHP Models
June 26, 2007 @ 12:38:00

The guys over on Sanisoft.com dropped us a line today to let us know about a new entry on their blog showing how to implement attach and detach behaviors in CakePHP models.

Behaviors are one of the best things that have been added to CakePHP 1.2, they allow you to add functionality to your models in a very elegant and modular fashion. They also promote a lot of code reuse. Perhaps a real life example would illustrate it better.

They show how to create behaviors that can perform a save() call on an image with the backend code doing all the hard work. They create the two methods - dontActAs and nowActsAs - to make attaching and detaching simple.

0 comments voice your opinion now!
cakephp framework attach detach behavior model cakephp framework attach detach behavior model



Similar Posts

International PHP Magzine: Poll Question: Do you believe the following about PHP?

Eirik Hoem's Blog: Why Delphi for PHP should have used Prado instead of VCL

Michael Kimsal\'s Blog: Bizarre PHP behaviour

Symfony Blog: symfony 1.0.4 released

Hasin Hayder's Blog: We are close to release Orchid, the new Framework


Community Events









Don't see your event here?
Let us know!


drupal extension facebook windows wordpress podcast developer joomla hiphop feature opinion job conference apache microsoft codeigniter release symfony framework zendframework

All content copyright, 2010 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework