note 89311 deleted from language.oop5.visibility by thiago
| From: | thiago@php.net | Date: | Tue, 03 Mar 2009 13:44:52 +0000 |
| Subject: | note 89311 deleted from language.oop5.visibility by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151389@lists.php.net to get a copy of this message | ||
Note Submitter: sverel
----
How can i get STATIC var of child class from parent class.
For example i need:
<?php
abstract class API_MODEL {
protected static $_TABLE;
function getById($ID)
{
var_dump(self::$_TABLE);
}
}
class MODEL_NEWS extends API_MODEL {
protected static $_TABLE = 'news';
}
MODEL_NEWS::getById(23); // var $tbl is NULL.
?>