Changeset 2207 for sandbox/workflow/branches/609/lib/Factory.php
- Timestamp:
- 03/10/10 16:25:29 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/lib/Factory.php
r2206 r2207 1 1 <?php 2 2 3 /** 4 * The Factory frontend class. 5 * This class controls which concrete Factory 6 * will be used, depending on the current 7 * 'security mode'. It lazy instantiates both 8 * factories (process and module) when they are 9 * required, and stores these objects. All the 10 * accesses to factories are done through this class, 11 * implementing a kind of Proxy design pattern. 12 * This class depends on Security frontend class 13 * to decide which factory to call. 14 * 15 * @author Pedro Eugênio Rocha 16 * @package Factory 17 * @static 18 */ 3 19 class Factory { 4 20 21 22 /** 23 * @var object $_unsecuredFactory Stores WorkflowFactory object. 24 * @access private 25 * @static 26 */ 5 27 private static $_unsecuredFactory = null; 6 28 29 30 /** 31 * @var object $_securedFactory Stores ProcessFactory object. 32 * @access private 33 * @static 34 */ 7 35 private static $_securedFactory = null; 8 36 9 37 38 /** 39 * Constructor. Just disable direct instantiation. 40 * 41 * @access public 42 * @static 43 * @return void 44 */ 10 45 public function __construct() { 11 46 throw new Exception("Oops! Static only class."); … … 13 48 14 49 50 /** 51 * Just forward this call to the correct class. 52 * 53 * @access public 54 * @retun object 55 * @static 56 */ 15 57 public static function getInstance() { 16 58 … … 39 81 } 40 82 83 84 /** 85 * Just forward this call to the correct class. 86 * 87 * @todo I must implement it! 88 * @access public 89 * @retun object 90 * @static 91 */ 41 92 public static function newInstance() { 42 43 93 } 44 94 }
Note: See TracChangeset
for help on using the changeset viewer.