Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Index {
- private static $_elements = array();
- private static $_idx = 0;
- private static $_prefix = ".";
- private static function add($element) {
- self::$_elements[self::$_idx] = $element;
- self::$_idx++;
- }
- public static function initialize() {
- $banner = new Banner(self::$_prefix);
- self::add($banner);
- }
- static public function show() {
- for ($i = 0; $i < self::$_idx; $i++) {
- self::$_elements[$i]->show();
- }
- }
- }
- Index::initialize();
- Index::show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement