Category Archive For "PHP"
Zend_Paginator Without Adapter Data
If you simply want to take advantage of Zend_Paginators page generation function without feeding it actual data, how do you do it? Simple, implement Zend_Paginator_Adapter_Interface in your custom class and override three functions like below: <?php class Dotmanila_Paginator_Adapter_Null implements Zend_Paginator_Adapter_Interface { private $_count = 0; public function __construct(array $data) { if(isset($data['count']) AND $data['count'] > 0) …
Reduce Stack Frame Depth from XDebug Trace Output
Earlier, I’ve written about how to dump code trace from your PHP application using XDebug, however, more often that not, you get lengthy results and you simply want to get an overview up to certain depth. I’ve created a simple PHP for that which you can find here. It’s fairly easy to use, simply feed …
Identify Bottleneck on your PHP Scripts with XDebug Code Trace
XDebug has been around for a while and I have been looking to try its features for a while. This time, I was able to poke around briefly with dumping code traces for my PHP code. 1. Make sure to have XDebug extension installed, you can either do so from your OS package management or …