Monthly Archives: July 2009

CakePHP Shells, and Cron Jobs

As part of the same project that resulted in my last posting, I needed to write several processes that would be managed by cron. In the past, at the Yahoo contract, we had come up with a way to do this involving a customized version of the basic CakePHP index.php file. However, his required us [...]

Automatic DB Field Encryption in CakePHP

I’ve written the following behavior for a project I recently completed in Cake, and I thought it would be worth sharing: class CryptableBehavior extends ModelBehavior { var $settings = array();   function setup(&$model, $settings) { if (!isset($this->settings[$model->alias])) { $this->settings[$model->alias] = array( ‘fields’ => array() ); }   $this->settings[$model->alias] = array_merge($this->settings[$model->alias], $settings); }   function beforeFind(&$model, [...]