コード例 #1
0
ファイル: APIImport.class.php プロジェクト: alachaum/timetrex
 public function __construct()
 {
     parent::__construct();
     //Make sure parent constructor is always called.
     //When APIImport()->getImportObjects() is called directly, there won't be a main class to call.
     if (isset($this->main_class) and $this->main_class != '') {
         $this->import_obj = new $this->main_class();
         $this->import_obj->company_id = $this->getCurrentCompanyObject()->getID();
         $this->import_obj->user_id = $this->getCurrentUserObject()->getID();
         Debug::Text('Setting main class: ' . $this->main_class . ' Company ID: ' . $this->import_obj->company_id, __FILE__, __LINE__, __METHOD__, 10);
     } else {
         Debug::Text('NOT Setting main class... Company ID: ' . $this->getCurrentCompanyObject()->getID(), __FILE__, __LINE__, __METHOD__, 10);
     }
     return TRUE;
 }
コード例 #2
0
ファイル: APIReport.class.php プロジェクト: alachaum/timetrex
 public function __construct()
 {
     parent::__construct();
     //Make sure parent constructor is always called.
     //$company_obj = $this->getCurrentCompanyObject();
     //$user_obj = $this->getCurrentUserObject();
     //if ( isset($this->main_class) AND class_exists( $this->main_class, TRUE ) == TRUE ) {
     //$report_obj = new $this->main_class;
     $report_obj = TTNew($this->main_class);
     //Allow plugins to work with reports.
     $report_obj->setUserObject($this->getCurrentUserObject());
     $report_obj->setPermissionObject($this->getPermissionObject());
     $this->setMainClassObject($report_obj);
     //}
     return TRUE;
 }
コード例 #3
0
ファイル: APIUser.class.php プロジェクト: alachaum/timetrex
 public function __construct()
 {
     parent::__construct();
     //Make sure parent constructor is always called.
     return TRUE;
 }