Merge branch '2013.10'
[tine20] / tine20 / Tool / Application / templates / Controller / ExampleRecord.php
1 <?php
2 /**
3  * ExampleRecord controller for ExampleApplication application
4  * 
5  * @package     ExampleApplication
6  * @subpackage  Controller
7  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
8  * @author      Philipp Schüle <p.schuele@metaways.de>
9  * @copyright   Copyright (c) 2007-2011 Metaways Infosystems GmbH (http://www.metaways.de)
10  *
11  */
12
13 /**
14  * ExampleRecord controller class for ExampleApplication application
15  * 
16  * @package     ExampleApplication
17  * @subpackage  Controller
18  */
19 class ExampleApplication_Controller_ExampleRecord extends Tinebase_Controller_Record_Abstract
20 {
21     /**
22      * the constructor
23      *
24      * don't use the constructor. use the singleton 
25      */
26     private function __construct() {
27         $this->_applicationName = 'ExampleApplication';
28         $this->_backend = new ExampleApplication_Backend_ExampleRecord();
29         $this->_modelName = 'ExampleApplication_Model_ExampleRecord';
30         $this->_purgeRecords = FALSE;
31         // activate this if you want to use containers
32         $this->_doContainerACLChecks = FALSE;
33         $this->_resolveCustomFields = TRUE;
34     }
35     
36     /**
37      * holds the instance of the singleton
38      *
39      * @var ExampleApplication_Controller_ExampleRecord
40      */
41     private static $_instance = NULL;
42     
43     /**
44      * the singleton pattern
45      *
46      * @return ExampleApplication_Controller_ExampleRecord
47      */
48     public static function getInstance() 
49     {
50         if (self::$_instance === NULL) {
51             self::$_instance = new ExampleApplication_Controller_ExampleRecord();
52         }
53         
54         return self::$_instance;
55     }        
56
57     /****************************** overwritten functions ************************/    
58     
59 }