Changeset 2207 for sandbox/workflow
- Timestamp:
- 03/10/10 16:25:29 (14 years ago)
- Location:
- sandbox/workflow/branches/609/lib
- Files:
-
- 4 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 } -
sandbox/workflow/branches/609/lib/ProcessFactory.php
r2206 r2207 1 1 <?php 2 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 */ 3 15 class ProcessFactory extends BaseFactory { 4 16 -
sandbox/workflow/branches/609/lib/Security.php
r2206 r2207 3 3 /** 4 4 * Security class for Workflow module. 5 * You should never forget to call 'enable' 6 * public method to enable security before 7 * executing process code. 5 8 * 6 9 * @author Pedro Eugênio Rocha -
sandbox/workflow/branches/609/lib/WorkflowFactory.php
r2206 r2207 1 1 <?php 2 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 */ 3 14 class WorkflowFactory extends BaseFactory { 4 15
Note: See TracChangeset
for help on using the changeset viewer.