Return to Snippet

Revision: 59167
at August 22, 2012 03:44 by evinweissenberg


Initial Code
<?php
/*
|---------------------------
| Author: Evin Weissenberg
|---------------------------
*/
class Copyright_Display {

    private $company_name;
    private $utf8;

    function __constructor() {

        $this->utf8 = ini_set('default_charset', 'UTF-8');

    }

    function setCompanyName($company_name) {

        $this->company_name = (string)$company_name;
        return $this;
    }

    function __get($property) {

        return $this->$property;

    }

    function render() {

        $copyright = "Copyright © " . date('Y') . " " . $this->company_name;

        return $copyright;

    }

    function __destructor() {

        unset($this->utf8);

    }
}
$c = new Copyright_Display();
$c->setCompanyName('ACME LLC')->render();

Initial URL
http://www.evinw.com

Initial Description
Display Copyright

Initial Title
Copyright Display

Initial Tags
php

Initial Language
PHP