Category Archives: PHP

PHP – Useful TinyMVC View Helpers

Back again with more TinyMVC code. As I get more into this framework the more code I’ll be posting up, the functions in the code below are to be used directly from TinyMVC views and not controllers or models. One … Continue reading

Posted in PHP, PHP frameworks | Tagged , , , | Leave a comment

PHP – TinyMVC Template Wrapper Plugin

TinyMVC provides a great structure for developing new projects, it’s small base allows the developer to write new plug-ins and extend on the existing framework. Below you’ll find a template wrapper I have made to manage the views and assigning … Continue reading

Posted in PHP, PHP frameworks | Tagged , , | 1 Comment

PHP Page basic page caching

One of the most useful things you can do in terms of performance is to cache the page you’re currently serving so that no code gets executed again and again when it isn’t needed. I’ve provided a sample below of … Continue reading

Posted in PHP | Tagged , , | Leave a comment

PHP Object to Multidimensional Array

Below is a piece of code showing how to transform an Object into a Multidimensional Array, there are quite a few functions in PHP that return stdClass objects such as some MySQL, JSON or XML functions. If it is a … Continue reading

Posted in PHP | Tagged , , , | Leave a comment

PHP Simple permission framework with Bitwise operations

Below is an example class of a basic permission framework with permissions worked out by using bitwise operations. This provides basic functions such as hasAccess() can() and permNeeded() I won’t be going into detail regarding binary math and why it … Continue reading

Posted in PHP | Tagged , , , | Leave a comment

PHP Arrays with the CachingIterator (peeking ahead)

One of the most useful things you may need when iterating through an array is to know whether or not there is another element after the current and in some cases you’ll want to know what the next element is. … Continue reading

Posted in PHP | Tagged , , | Leave a comment

PHP Configurable CD-KEY Format Validation

I’ve need this a few times, where I have to take input of a CD-KEY in a specific format and it needs to be checked to see if it’s in valid or not before proceeding. Normally – I would just … Continue reading

Posted in PHP | Tagged , , , | Leave a comment

Turn PHP classes in to a RESTful API with Restler

The Restler packer is a RESTful API server framework that is written in PHP that aids your mobile / web / desktop applications. A framework, but with a difference – Restler is all here to bend and mend to your … Continue reading

Posted in PHP, PHP frameworks, web developement | Tagged , , , | Leave a comment