Cake/Model/Permission.php

1 <?php
2 /**
3 *
4 * PHP 5
5 *
6 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
7 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
8 *
9 * Licensed under The MIT License
10 * Redistributions of files must retain the above copyright notice.
11 *
12 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 * @link http://cakephp.org CakePHP(tm) Project
14 * @package Cake.Model
15 * @since CakePHP(tm) v 0.2.9
16 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
17 */
18  
19 App::uses('AppModel', 'Model');
20  
21 /**
22 * Permissions linking AROs with ACOs
23 *
24 * @package Cake.Model
25 */
26 class Permission extends AppModel {
27  
28 /**
29 * Model name
30 *
31 * @var string
32 */
33 public $name = 'Permission';
34  
35 /**
36 * Explicitly disable in-memory query caching
37 *
38 * @var boolean
39 */
40 public $cacheQueries = false;
41  
42 /**
43 * Override default table name
44 *
45 * @var string
46 */
47 public $useTable = 'aros_acos';
48  
49 /**
50 * Permissions link AROs with ACOs
51 *
52 * @var array
53 */
54 public $belongsTo = array('Aro', 'Aco');
55  
56 /**
57 * No behaviors for this model
58 *
59 * @var array
60 */
61 public $actsAs = null;
62  
63 /**
64 * Constructor, used to tell this model to use the
65 * database configured for ACL
66 */
67 public function __construct() {
68 $config = Configure::read('Acl.database');
69 if (!empty($config)) {
70 $this->useDbConfig = $config;
71 }
72 parent::__construct();
73 }
74  
75 }
76  
77