PatternsPrototype.php

A Prototype Class

JavaScript has an elaborate prototyping system for its objects and functions. This is an effort to partially duplicate the system seen in JavaScript. The idea is that you instantiate a Prototype, add your own properties and functions, register that prototype into an array using a string, and create a chain of prototypes using the parent property. If a method or property doesn't exist in a Prototype, it checks the parent property to see if it exists, recursively. If you change the property value of a parent prototype it's reflected in it's "children", likewise, if you set a similarly named property value on a "child" prototype, it overrides the __parent property value.

Classes

Prototype Prototype Class - Defines a JavaScript Like Prototype