1: <?php
 2: /**
 3:  * This file contains the ISO6392 collection and item class.
 4:  *
 5:  * @package          Core
 6:  * @subpackage       GenericDB_Model
 7:  * @version          SVN Revision $Rev:$
 8:  *
 9:  * @author           Alexander Scheider
10:  * @copyright        four for business AG <www.4fb.de>
11:  * @license          http://www.contenido.org/license/LIZENZ.txt
12:  * @link             http://www.4fb.de
13:  * @link             http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Isocode 639-2 collection
20:  *
21:  * @package Core
22:  * @subpackage GenericDB_Model
23:  */
24: class cApiIso6392Collection extends ItemCollection {
25: 
26:     public function __construct($select = false) {
27:         parent::__construct(cRegistry::getDbTableName('iso_639_2'), 'iso');
28:         $this->_setItemClass('cApiIso6392');
29: 
30:         if ($select !== false) {
31:             $this->select($select);
32:         }
33:     }
34: 
35: }
36: 
37: /**
38:  * Iso 639-2 item
39:  *
40:  * @package Core
41:  * @subpackage GenericDB_Model
42:  */
43: class cApiIso6392 extends Item {
44: 
45:     /**
46:      * Constructor Function
47:      *
48:      * @param mixed $mId Specifies the ID of item to load
49:      */
50:     public function __construct($mId = false) {
51:         parent::__construct(cRegistry::getDbTableName('iso_639_2'), 'iso');
52:         $this->setFilters(array(), array());
53:         if ($mId !== false) {
54:             $this->loadByPrimaryKey($mId);
55:         }
56:     }
57: 
58: }
59: