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

Revision 2222, 2.1 KB checked in by pedroerp, 14 years ago (diff)

Ticket #609 - Atualizando comentários para seguir o padrão phpdoc.

  • Property svn:executable set to *
Line 
1<?php
2/**************************************************************************\
3* eGroupWare                                                               *
4* http://www.egroupware.org                                                *
5* --------------------------------------------                             *
6*  This program is free software; you can redistribute it and/or modify it *
7*  under the terms of the GNU General Public License as published by the   *
8*  Free Software Foundation; either version 2 of the License, or (at your  *
9*  option) any later version.                                              *
10\**************************************************************************/
11
12/**
13 * Specialization of the BaseFactory class.
14 * This class is used to instantiate classes for
15 * processes. You cannot access this class directly,
16 * but requests to the Factory frontend class in
17 * 'secured mode' will be forwarded to this class.
18 * It should be much more restrictive than its
19 * older brother (or sister), WorkflowFactory...
20 *
21 * @package Factory
22 * @license http://www.gnu.org/copyleft/gpl.html GPL
23 * @author Pedro Eugênio Rocha - pedro.eugenio.rocha@gmail.com
24 */
25final class ProcessFactory extends BaseFactory {
26
27
28        /**
29         * @var boolean $_instantiated Attribute that stores whether this
30         *              class was instantiated or not. This is used to limit the
31         *              instantiation of this class.
32         * @access private
33         * @static
34         */
35        private static $_instantiated = false;
36
37        /**
38         * Construct the class. This function will inform which classes
39         * you will be able to instantiate and where to find it.
40         * This function implements a kind of singleton design pattern too.
41         * @access public
42         */
43        public function __construct() {
44
45                /* don't let the user to instantiate this class more than once. */
46                if (self::$_instantiated)
47                        throw new Exception("You can't instantiate this class again.");
48
49                /* registering allowed classes */
50                //$this->registerFileInfo('WorkflowObjects', 'class.WorkflowObjects.inc.php', 'inc');
51
52                /* ok. no more instances of this class.. */
53                self::$_instantiated = true;
54        }
55}
56
57?>
Note: See TracBrowser for help on using the repository browser.