A HOWTO on Optimizing PHP

Autoloading Classes

PHP 5.2, late static binding, get_called_class() and $self = new self()


Early on in Septuro’s development, well prior to the name being adopted, I had a tough challenge dealing with the dataTemplates. Chris Webb, one of the Septuro founders, was helping me with this particular issue. In the abstract dataTemplate, we wanted to set up a factory method make() that just pumped out an instance of the class that was called. The issue that we ran into involved late static binding.
view plaincopy to clipboardprint?

1. class abstract_dataTemplate {

Syndicate content