Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function getInstance()
- {
- // o que seria isso?
- // nΓ£o deveria estar no corpo da classe?
- static $instance = null;
- if (null === $instance) {
- // nΓ£o estΓ‘ persistindo para static::$instance
- $instance = new static();
- }
- // deveria ser static::$instance
- return $instance;
- }
- // o correto seria:
- static $instance = null;
- public static function getInstance()
- {
- if (null === static::$instance) {
- static::$instance = new static();
- }
- return static::$instance;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement