-
Recent Posts
Recent Comments
Archives
- June 2018
- March 2018
- October 2017
- August 2015
- May 2015
- February 2015
- January 2015
- December 2014
- August 2014
- July 2014
- May 2014
- March 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- January 2013
- August 2012
- December 2011
- November 2011
- March 2011
- August 2010
- February 2010
- January 2010
- June 2009
- April 2009
- March 2009
- December 2008
- November 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
Categories
Meta
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
5 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
PHP 5: Subclasses
Subclassing allows flexibility in code. E.g. there may be many types of User to a site. We can define subclasses of User such as AdminUser, RegisteredUser, UnregisteredUser which may share some common methods and properties but may have unique abilities. … Continue reading
Posted in PHP, Programming
Leave a comment
PHP 5: By reference or by value
PHP 4 passed variables by value by default. This was not very pleasant to work with. The way around this was to pepper your code with ampersands (to tell PHP to use references instead) but forgetting to include one was … Continue reading
Posted in PHP, Programming
Leave a comment
PHP 5: Introduction to classes
Classes are used as an abstraction of a real world situation. E.g class User { } may be used to contain the code that will represent a user of an application. Objects have properties and methods. Properties may be thought … Continue reading
Posted in PHP, Programming
Leave a comment