Changeset 2207 for sandbox/workflow


Ignore:
Timestamp:
03/10/10 16:25:29 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Atualizando e padronizando comentários nas novas classes.

Location:
sandbox/workflow/branches/609/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/lib/Factory.php

    r2206 r2207  
    11<?php 
    22 
     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 */ 
    319class Factory { 
    420 
     21 
     22        /** 
     23         * @var object $_unsecuredFactory Stores WorkflowFactory object. 
     24         * @access private 
     25         * @static 
     26         */ 
    527        private static $_unsecuredFactory = null; 
    628 
     29 
     30        /** 
     31         * @var object $_securedFactory Stores ProcessFactory object. 
     32         * @access private 
     33         * @static 
     34         */ 
    735        private static $_securedFactory = null; 
    836 
    937 
     38        /** 
     39         * Constructor. Just disable direct instantiation. 
     40         * 
     41         * @access public 
     42         * @static 
     43         * @return void 
     44         */ 
    1045        public function __construct() { 
    1146                throw new Exception("Oops! Static only class."); 
     
    1348 
    1449 
     50        /** 
     51         * Just forward this call to the correct class. 
     52         * 
     53         * @access public 
     54         * @retun object 
     55         * @static 
     56         */ 
    1557        public static function getInstance() { 
    1658 
     
    3981        } 
    4082 
     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         */ 
    4192        public static function newInstance() { 
    42  
    4393        } 
    4494} 
  • sandbox/workflow/branches/609/lib/ProcessFactory.php

    r2206 r2207  
    11<?php 
    22 
     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 */ 
    315class ProcessFactory extends BaseFactory { 
    416 
  • sandbox/workflow/branches/609/lib/Security.php

    r2206 r2207  
    33/** 
    44 * Security class for Workflow module. 
     5 * You should never forget to call 'enable' 
     6 * public method to enable security before 
     7 * executing process code. 
    58 * 
    69 * @author Pedro Eugênio Rocha 
  • sandbox/workflow/branches/609/lib/WorkflowFactory.php

    r2206 r2207  
    11<?php 
    22 
     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 */ 
    314class WorkflowFactory extends BaseFactory { 
    415 
Note: See TracChangeset for help on using the changeset viewer.