PageRenderTime 34ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/Cake/Model/Permission.php

https://bitbucket.org/udeshika/fake_twitter
PHP | 74 lines | 16 code | 8 blank | 50 comment | 1 complexity | d7236eade24a4b35c71f362e6bb053b1 MD5 | raw file
  1. <?php
  2. /**
  3. *
  4. * PHP 5
  5. *
  6. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  7. * Copyright 2005-2011, 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-2011, 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. App::uses('AppModel', 'Model');
  19. /**
  20. * Permissions linking AROs with ACOs
  21. *
  22. * @package Cake.Model
  23. */
  24. class Permission extends AppModel {
  25. /**
  26. * Model name
  27. *
  28. * @var string
  29. */
  30. public $name = 'Permission';
  31. /**
  32. * Explicitly disable in-memory query caching
  33. *
  34. * @var boolean
  35. */
  36. public $cacheQueries = false;
  37. /**
  38. * Override default table name
  39. *
  40. * @var string
  41. */
  42. public $useTable = 'aros_acos';
  43. /**
  44. * Permissions link AROs with ACOs
  45. *
  46. * @var array
  47. */
  48. public $belongsTo = array('Aro', 'Aco');
  49. /**
  50. * No behaviors for this model
  51. *
  52. * @var array
  53. */
  54. public $actsAs = null;
  55. /**
  56. * Constructor, used to tell this model to use the
  57. * database configured for ACL
  58. */
  59. public function __construct() {
  60. $config = Configure::read('Acl.database');
  61. if (!empty($config)) {
  62. $this->useDbConfig = $config;
  63. }
  64. parent::__construct();
  65. }
  66. }