Example #1
0
 /**
  * standard constructor
  * @param  string $entity   the entity type (may be 'Host')
  * @param  string $args     optionnal arguments
  * @access public
  **/
 public function __construct($entity, $args = null) {
   $this->descriptor = OBM_Services::getInstance();
   if (is_array($args)) {
     $data  = is_array($args['data'])  ? $args['data']  : null;
     $files = is_array($args['files']) ? $args['files'] : null;
     parent::__construct($data, $files);
   }
 }
Example #2
0
 /**
  * return the unique instance of OBM_Services object
  * @access public
  * @return OBM_Services
  **/
 public static function getInstance() {
   if (!(self::$instance instanceof self)) {
     self::$instance = new OBM_Services();
   }
   return self::$instance;
 }