Revision 2207,
1.2 KB
checked in by pedroerp, 14 years ago
(diff) |
Ticket #609 - Atualizando e padronizando comentários nas novas classes.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * Specialization of the BaseFactory class. |
---|
5 | * This class is used to instantiate classes by |
---|
6 | * the workflow module (not by processes). You |
---|
7 | * cannot access this class directly, but requests |
---|
8 | * to the Factory frontend class in 'unsecured mode' |
---|
9 | * will be forwarded to this class. |
---|
10 | * |
---|
11 | * @author Pedro Eugênio Rocha |
---|
12 | * @package Factory |
---|
13 | */ |
---|
14 | class WorkflowFactory extends BaseFactory { |
---|
15 | |
---|
16 | |
---|
17 | /** |
---|
18 | * @var boolean $_instantiated Attribute that stores whether this |
---|
19 | * class was instantiated or not. This is used to limit the |
---|
20 | * instantiation of this class. |
---|
21 | * @access private |
---|
22 | * @static |
---|
23 | */ |
---|
24 | private static $_instantiated = false; |
---|
25 | |
---|
26 | |
---|
27 | /** |
---|
28 | * Construct the class. This function will inform which classes |
---|
29 | * you will be able to instantiate and where to find it. |
---|
30 | * This function implements a kind of singleton design pattern too. |
---|
31 | * @access public |
---|
32 | */ |
---|
33 | public function __construct() { |
---|
34 | |
---|
35 | /* don't let the user to instantiate this class more than once. */ |
---|
36 | if (self::$_instantiated) |
---|
37 | throw new Exception("You can't instantiate this class again."); |
---|
38 | |
---|
39 | /* registering allowed classes */ |
---|
40 | $this->registerFileInfo('WorkflowObjects', 'class.WorkflowObjects.inc.php', 'inc'); |
---|
41 | |
---|
42 | /* ok. no more instances of this class.. */ |
---|
43 | self::$_instantiated = true; |
---|
44 | } |
---|
45 | } |
---|
46 | |
---|
47 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.