1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?php abstract class page{ public $head; public $content; public $foot; function __construct($head, $content, $foot){ $this->head = $head; $this->content = $content; $this->foot = $foot; } public function getPage(){ $smarty = new Smarty(); } } class login extends page{ public function __construct($data){ parent::__construct("login head", $data, "login foot"); } } ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <?php class talker{ private $data = 'Hi'; public function & get(){ return $this->data; } public function out(){ echo $this->data; } } $aa = new talker(); $d = &$aa->get(); $aa->out(); $d = 'How'; $aa->out(); $d = 'Are'; $aa->out(); $d = 'You'; $aa->out(); ?> |
Recent Comments