CakePHP doesn’t just come with its own console applications for baking code, managing ACL, inspecting classes, manipulating the schema, internationalisation and running the testsuite (whew!) it also lets you write your own console applications. [NB: I always have an external cake core directory, for easy swapping. The code examples all assume you have done this,… Read more »
Posts Tagged: cakephp
CakePHP’s basics.php functions – a series of really useful shortcut functions available globally in your CakePHP app
If you are working with CakePHP and haven’t checked it out yet, it’s very well worth looking through basics.php in the API docs. As well as adding some PHP 5 functionality on PHP 4 servers, the script also adds a fair number of utility functions to the global namespace, such as: // similar to print_r(),… Read more »
Disable Debug Output for Ajax in CakePHP
If you are developing a CakePHP application and you have the debug value set to anything greater than 0 in your config/core.php file, you will find that Ajax requests will also get the extra information appended to the output. In order to circumvent this add this to your “app_controller.php” file (which sits directly inside the… Read more »
Custom Model and Field Result Set in CakePHP
If you’re using CakePHP and want to perform a custom SQL query while forcing your results into an arbitrary Model-based array when they are given back to you, you could do a lot worse than using grigri’s (who is a fellow South Westerner and therefore obviously a good bloke ;) DboMysqlEx (Mysql Extended) Class, or… Read more »