| 1234567891011121314151617181920212223242526 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/5/22
- * Time: 15:24
- */
- namespace datainf\pplus;
- trait Instance
- {
- private static $Instance = null;
- public static function getInstance($cache = true)
- {
- if ($cache && self::$Instance) {
- return self::$Instance;
- }
- self::$Instance = new self();
- return self::$Instance;
- }
- }
|