If I have a class called Sales, which has only static attributes and methods: - What kind of constructor should I write for this class? - How can I make calls to the methods and attributes of this class inside of its own scope?
2条回答 默认 最新
- dqy92287 2015-12-10 12:43关注
You can use
self::method();
operator to call it's own methods and attributes..Constructor
private function __construct() { // Your "heavy" initialization stuff here }
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报