Revision 2206,
930 bytes
checked in by pedroerp, 14 years ago
(diff) |
Ticket #609 - Versão inicial das classes de segurança e fábricas.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | class ProcessFactory extends BaseFactory { |
---|
4 | |
---|
5 | |
---|
6 | /** |
---|
7 | * @var boolean $_instantiated Attribute that stores whether this |
---|
8 | * class was instantiated or not. This is used to limit the |
---|
9 | * instantiation of this class. |
---|
10 | * @access private |
---|
11 | * @static |
---|
12 | */ |
---|
13 | private static $_instantiated = false; |
---|
14 | |
---|
15 | /** |
---|
16 | * Construct the class. This function will inform which classes |
---|
17 | * you will be able to instantiate and where to find it. |
---|
18 | * This function implements a kind of singleton design pattern too. |
---|
19 | * @access public |
---|
20 | */ |
---|
21 | public function __construct() { |
---|
22 | |
---|
23 | /* don't let the user to instantiate this class more than once. */ |
---|
24 | if (self::$_instantiated) |
---|
25 | throw new Exception("You can't instantiate this class again."); |
---|
26 | |
---|
27 | /* registering allowed classes */ |
---|
28 | //$this->registerFileInfo('WorkflowObjects', 'class.WorkflowObjects.inc.php', 'inc'); |
---|
29 | |
---|
30 | /* ok. no more instances of this class.. */ |
---|
31 | self::$_instantiated = true; |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.