Monthly Archives: December 2004

Review of Curry Capital, Brick Lane, London

A rather good curry I’ve tried the Brick Lane curry experience a few times now, as I live in East London and work in Bethnal Green, but have always been disappointed. I think out of the worst half a dozen … Continue reading

Posted in Restaurants/Pubs | 1 Comment

PHP 5: Class hinting

Class hinting is where the class of object to be passed into a method is specified in the function call. e.g. abstract class User { protected $logState; public function User() { $this->logState = new LogState() } public function setLogstate(LogState $logState) … Continue reading

Posted in PHP, Programming | Leave a comment

PHP 5: Interfaces

Interfaces are a way of adding the definition of extra methods onto a class to force it to conform to a particular pattern. An interface consists entirely of methods with empty bodies i.e. abstract methods: interface Saveable() { public function … Continue reading

Posted in PHP, Programming | Leave a comment

PHP 5: Static classes

Static classes are used for utility scripts that (in the past) would have been in common functions or held global variables. The advantage of using a static class is more to increase code readability (and ease of debugging) than for … Continue reading

Posted in PHP, Programming | 4 Comments

PHP 5: Abstract classes

Abstract classes are used to define operations and parameters but where you do not want a class instantiated directly. An abstract class must, therefore, have subclasses. In our example, we may not allow a type of general “User” but insist … Continue reading

Posted in PHP, Programming | Leave a comment

PHP 5: Public, private, protected

PHP 5 allows you to declare properties and methods as public, private or protected. These are defined as: Public: anyone either inside the class or outside can access them Private: only the specified class can access them. Even subclasses will … Continue reading

Posted in PHP, Programming | 5 Comments

PHP 5: The constructor method

The introduction of a method called __construct() means that function User() no longer need be the default method name for instantiating an instance of the User class. This is especially useful in the case where you are using subclasses, or … Continue reading

Posted in PHP, Programming | 1 Comment