Archive for 'PHP'
Factory Pattern in PHP
April 1st, 2009. Published under PHP. No Comments.
Factroy Pattern in PHP
Factory pattern, allows you to create a centric place in your classes where you could craete a new instance that depends on one or more classes.
In this example we’ll take a look at a parser in PHP
Singleton Pattern in PHP
March 31st, 2009. Published under PHP. No Comments.
Singleton Pattern in PHP
PHP classes allows you to define the attributes (instance or class variables) and methods that manipulate with the attributes.
Every instance of a class shares a separate copy of attributes
PHP Serialization method
February 25th, 2009. Published under PHP. No Comments.
PHP allows us to serialize objects, arrays, etc… with the serialize() function.
What means serialization? Serialization means a storable reprezentation of a value, where the value can be an array, object, etc…
How it works:
Suppose you have this array:
[cc lang="php"]