16 Commits

Author SHA1 Message Date
Salvatore Cozzolongo
f815f66436 private on attribute 2014-03-12 11:29:33 +01:00
v.velikiy
faefa64e2f Singleton Diagram 2013-11-29 15:06:20 +02:00
Dominik Liebler
ed6fee311a Merge branch 'READMEs' 2013-09-24 14:23:10 +02:00
Dominik Liebler
5e0fe5445d README Singleton 2013-09-24 14:10:45 +02:00
AlexBaitov
7db9f2b9e0 CHG PHPDoc - Replaced @return Singleton -> @return self for easier reusage 2013-09-23 11:49:51 +07:00
Dominik Liebler
3d8098c5e4 Merge pull request #35 from olekhy/patch-1
use static class property instead of static variable for Singleton
2013-09-21 15:10:07 -07:00
Oleksandr
52ef48fd28 Update Singleton.php
Hi! I'm sure current realization of singleton is classic variance of the pattern. But not really correct (more then is mistaken for me) in relation to real codding on PHP projects. ;)

```php
class A extends Singleton // Singleton which used static inside of getInstance() method  
{}

class B extends A
{}

$a = A::getInstance();
$b = B::getInstance();
$c = Singleton::getInstance();

$a === $b && $b === $c; // returned FALSE
```
when u would be utilized Singleton updated then expression above returned TRUE.
2013-09-21 22:05:13 +02:00
Dominik Liebler
ec6ed14767 cs 2013-09-12 11:47:15 +02:00
Dominik Liebler
c71d715a65 mark Singleton as an anti-pattern (#31) 2013-09-03 14:52:42 +02:00
Trismegiste
deea95642b PSR-0 compliance 2013-08-24 00:36:54 +02:00
Vasily Mikhaylovsky
41df458472 move Singleton::$_instance into Singleton::getInstance() method 2013-05-13 09:11:33 +06:00
Alexey
7f540427ee omitted static declaration 2013-05-08 15:30:54 +04:00
Dominik Liebler
ceb6a3eeb9 fixed typo in Singleton 2013-05-08 07:51:19 +03:00
Dominik Liebler
1f37ca385f some more comments, typos etc. 2011-08-23 11:52:46 +02:00
Dominik Liebler
758daca9fa deleted PhpStorm generated comments 2011-08-23 09:20:40 +02:00
Dominik Liebler
e730ee6e8e added Singleton 2011-08-21 15:36:40 +02:00