source: sandbox/workflow/branches/609/lib/ProcessFactory.php @ 2207

Revision 2207, 1.3 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 for
6 * processes. You cannot access this class directly,
7 * but requests to the Factory frontend class in
8 * 'secured mode' will be forwarded to this class.
9 * It should be much more restrictive than its
10 * older brother (or sister), WorkflowFactory...
11 *
12 * @author Pedro Eugênio Rocha
13 * @package Factory
14 */
15class ProcessFactory extends BaseFactory {
16
17
18        /**
19         * @var boolean $_instantiated Attribute that stores whether this
20         *              class was instantiated or not. This is used to limit the
21         *              instantiation of this class.
22         * @access private
23         * @static
24         */
25        private static $_instantiated = false;
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.