← Back to team overview

amm-dev-tem team mailing list archive

[Branch ~amm-dev-tem/amm/trunk] Rev 30: Added comments in models

 

------------------------------------------------------------
revno: 30
committer: The Whole Life To Learn <thewholelifetolearn@xxxxxxxxx>
branch nick: sources
timestamp: Mon 2011-07-11 19:52:00 +0200
message:
  Added comments in models
modified:
  app/models/authorization.php
  app/models/authorizations_member.php
  app/models/event.php
  app/models/events_person.php
  app/models/formula.php
  app/models/member.php
  app/models/people_place.php
  app/models/person.php
  app/models/person_info.php
  app/models/place.php
  app/models/rank.php


--
lp:amm
https://code.launchpad.net/~amm-dev-tem/amm/trunk

Your team AMM dev team is subscribed to branch lp:amm.
To unsubscribe from this branch go to https://code.launchpad.net/~amm-dev-tem/amm/trunk/+edit-subscription
=== modified file 'app/models/authorization.php'
--- app/models/authorization.php	2011-05-27 07:58:31 +0000
+++ app/models/authorization.php	2011-07-11 17:52:00 +0000
@@ -1,7 +1,45 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Authorization model manages authorizations of the members
+ *
+ * @package       amm
+ * @subpackage    amm.app.model
+ */
 class Authorization extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'Authorization';
+/**
+ * Custom display field name. Display fields are used by Scaffold, in SELECT boxes' OPTION elements.
+ *
+ * @var string
+ * @access public
+ */
 	var $displayField = 'name';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'name' => array(
 			'notempty' => array(
@@ -14,8 +52,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of hasAndBelongsToMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasAndBelongsToMany = array(
 		'Member' => array(
 			'className' => 'Member',

=== modified file 'app/models/authorizations_member.php'
--- app/models/authorizations_member.php	2011-05-27 07:58:31 +0000
+++ app/models/authorizations_member.php	2011-07-11 17:52:00 +0000
@@ -1,8 +1,38 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Authorization Model manages accepted authorization of a member
+ *
+ * @package       amm
+ * @subpackage    amm.app.controller
+ */
 class AuthorizationsMember extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'AuthorizationsMember';
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of belongsTo associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $belongsTo = array(
 		'Authorization' => array(
 			'className' => 'Authorization',

=== modified file 'app/models/event.php'
--- app/models/event.php	2011-05-28 10:19:54 +0000
+++ app/models/event.php	2011-07-11 17:52:00 +0000
@@ -1,7 +1,45 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Authorization Model manages events of the organization
+ *
+ * @package       amm
+ * @subpackage    amm.app.controller
+ */
 class Event extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'Event';
+/**
+ * Custom display field name. Display fields are used by Scaffold, in SELECT boxes' OPTION elements.
+ *
+ * @var string
+ * @access public
+ */
 	var $displayField = 'name';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'name' => array(
 			'notempty' => array(
@@ -34,8 +72,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of hasAndBelongsToMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasAndBelongsToMany = array(
 		'Person' => array(
 			'className' => 'Person',

=== modified file 'app/models/events_person.php'
--- app/models/events_person.php	2011-05-29 19:51:01 +0000
+++ app/models/events_person.php	2011-07-11 17:52:00 +0000
@@ -1,6 +1,38 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Authorization Model manages connexion between events and people
+ *
+ * @package       amm
+ * @subpackage    amm.app.controller
+ */
 class EventsPerson extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'EventsPerson';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'fees_payed' => array(
 			'boolean' => array(
@@ -13,8 +45,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of belongsTo associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $belongsTo = array(
 		'Event' => array(
 			'className' => 'Event',

=== modified file 'app/models/formula.php'
--- app/models/formula.php	2011-05-29 20:18:38 +0000
+++ app/models/formula.php	2011-07-11 17:52:00 +0000
@@ -1,7 +1,45 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Authorization Model manages organization's formulas
+ *
+ * @package       amm
+ * @subpackage    amm.app.controller
+ */
 class Formula extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'Formula';
+/**
+ * Custom display field name. Display fields are used by Scaffold, in SELECT boxes' OPTION elements.
+ *
+ * @var string
+ * @access public
+ */
 	var $displayField = 'name';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'name' => array(
 			'notempty' => array(
@@ -24,8 +62,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of hasMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasMany = array(
 		'Member' => array(
 			'className' => 'Member',

=== modified file 'app/models/member.php'
--- app/models/member.php	2011-05-30 14:30:19 +0000
+++ app/models/member.php	2011-07-11 17:52:00 +0000
@@ -1,6 +1,38 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Member model manages members
+ *
+ * @package       amm
+ * @subpackage    amm.app.model
+ */
 class Member extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'Member';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'person_id' => array(
 			'numeric' => array(
@@ -73,8 +105,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of belongsTo associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $belongsTo = array(
 		'Person' => array(
 			'className' => 'Person',
@@ -120,6 +157,12 @@
 		)
 	);
 
+/**
+ * Detailed list of hasAndBelongsToMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasAndBelongsToMany = array(
 		'Authorization' => array(
 			'className' => 'Authorization',
@@ -138,6 +181,15 @@
 		)
 	);
 
+/**
+ * List of behaviors to load when the model object is initialized. Settings can be
+ * passed to behaviors by using the behavior name as index. Eg:
+ *
+ * var $actsAs = array('Translate', 'MyBehavior' => array('setting1' => 'value1'))
+ *
+ * @var array
+ * @access public
+ */
 	var $actsAs = array(
 		'Uploader.Attachment' => array(
 			'file' => array(
@@ -147,6 +199,12 @@
 		)
 	);
 
+/**
+ * Renews membership of the member
+ *
+ * Deletes id and medical certificat and updates date of membership
+ *
+ */
 	function renew() {
 		$this->id = null;
 		$this->data['Member']['id'] = null;

=== modified file 'app/models/people_place.php'
--- app/models/people_place.php	2011-05-25 12:20:40 +0000
+++ app/models/people_place.php	2011-07-11 17:52:00 +0000
@@ -1,8 +1,38 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * PeoplePlace model manages connexion between people and places
+ *
+ * @package       amm
+ * @subpackage    amm.app.model
+ */
 class PeoplePlace extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'PeoplePlace';
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of belongsTo associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $belongsTo = array(
 		'Person' => array(
 			'className' => 'Person',

=== modified file 'app/models/person.php'
--- app/models/person.php	2011-05-31 18:55:15 +0000
+++ app/models/person.php	2011-07-11 17:52:00 +0000
@@ -1,7 +1,45 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Person model manages people
+ *
+ * @package       amm
+ * @subpackage    amm.app.model
+ */
 class Person extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'Person';
+/**
+ * Custom display field name. Display fields are used by Scaffold, in SELECT boxes' OPTION elements.
+ *
+ * @var string
+ * @access public
+ */
 	var $displayField = 'name';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'firstname' => array(
 			'notempty' => array(
@@ -92,8 +130,13 @@
 			),
 		),*/
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of hasMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasMany = array(
 		'Member' => array(
 			'className' => 'Member',
@@ -175,7 +218,12 @@
 		)
 	);
 
-
+/**
+ * Detailed list of hasAndBelongsToMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasAndBelongsToMany = array(
 		'Event' => array(
 			'className' => 'Event',
@@ -223,7 +271,16 @@
 			'insertQuery' => ''
 		)
 	);
-	
+
+/**
+ * List of behaviors to load when the model object is initialized. Settings can be
+ * passed to behaviors by using the behavior name as index. Eg:
+ *
+ * var $actsAs = array('Translate', 'MyBehavior' => array('setting1' => 'value1'))
+ *
+ * @var array
+ * @access public
+ */
 	var $actsAs = array(
 		'Uploader.Attachment' => array(
 			'picture' => array(
@@ -240,6 +297,12 @@
 		)
 	);
 
+/**
+ * Cleans lastname and firstname. Concatanates firstname and lastname to create the name of the member
+ *
+ * Deletes id and medical certificat and updates date of membership
+ *
+ */
 	function concatName(&$data) {
 		$data['lastname'] = strtoupper($data['lastname']);
 		$data['firstname'] = ucfirst($data['firstname']);

=== modified file 'app/models/person_info.php'
--- app/models/person_info.php	2011-05-27 12:51:02 +0000
+++ app/models/person_info.php	2011-07-11 17:52:00 +0000
@@ -1,6 +1,38 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * PersonInfo model manages supplementary information about people
+ *
+ * @package       amm
+ * @subpackage    amm.app.model
+ */
 class PersonInfo extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'PersonInfo';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'person_id' => array(
 			'numeric' => array(
@@ -23,8 +55,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of belongsTo associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $belongsTo = array(
 		'Person' => array(
 			'className' => 'Person',

=== modified file 'app/models/place.php'
--- app/models/place.php	2011-05-28 10:02:47 +0000
+++ app/models/place.php	2011-07-11 17:52:00 +0000
@@ -1,7 +1,45 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Place model manages information about places
+ *
+ * @package       amm
+ * @subpackage    amm.app.model
+ */
 class Place extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'Place';
+/**
+ * Custom display field name. Display fields are used by Scaffold, in SELECT boxes' OPTION elements.
+ *
+ * @var string
+ * @access public
+ */
 	var $displayField = 'name';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'name' => array(
 			'notempty' => array(
@@ -44,8 +82,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of hasAndBelongsToMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasAndBelongsToMany = array(
 		'Person' => array(
 			'className' => 'Person',

=== modified file 'app/models/rank.php'
--- app/models/rank.php	2011-05-27 12:01:23 +0000
+++ app/models/rank.php	2011-07-11 17:52:00 +0000
@@ -1,7 +1,45 @@
 <?php
+/**
+ *
+ * PHP versions 4 and 5
+ *
+ * Licensed under GPL v3
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @link          http://www.assomem.org Association Member Management Project
+ * @package       amm
+ * @subpackage    amm.app.controller
+ * @license       GPL v3 (http://www.gnu.org/licenses/gpl.html)
+ */
+
+/**
+ * Rank model manages information about ranks of people
+ *
+ * @package       amm
+ * @subpackage    amm.app.model
+ */
 class Rank extends AppModel {
+/**
+ * Name of the model.
+ *
+ * @var string
+ * @access public
+ */
 	var $name = 'Rank';
+/**
+ * Custom display field name. Display fields are used by Scaffold, in SELECT boxes' OPTION elements.
+ *
+ * @var string
+ * @access public
+ */
 	var $displayField = 'name';
+/**
+ * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/')
+ * that have to match with preg_match(). Use these rules with Model::validate()
+ *
+ * @var array
+ * @access public
+ */
 	var $validate = array(
 		'order' => array(
 			'notempty' => array(
@@ -32,8 +70,13 @@
 			),
 		),
 	);
-	//The Associations below have been created with all possible keys, those that are not needed can be removed
 
+/**
+ * Detailed list of hasMany associations.
+ *
+ * @var array
+ * @access public
+ */
 	var $hasMany = array(
 		'PersonInfo' => array(
 			'className' => 'PersonInfo',