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) …

Continue reading

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 …

Continue reading