1: <?php
2:
3: namespace cli_db;
4:
5: require_once ROOT . 'classes/AbstractTable.php';
6:
7: class Organism extends AbstractTable {
8:
9: 10: 11:
12: public static function getKeys() {
13: return array(
14: 'id' => array(
15: 'colname' => 'OrganismId',
16: 'actions' => array(
17: 'details' => 'required',
18: 'update' => 'required',
19: 'delete' => 'required',
20: ),
21: 'description' => 'organism id'
22: ),
23: 'abbreviation' => array(
24: 'colname' => 'Abbreviation',
25: 'actions' => array(
26: 'insert' => 'optional',
27: 'update' => 'optional',
28: ),
29: 'description' => 'e.g. H.sapiens'
30: ),
31: 'genus' => array(
32: 'colname' => 'Genus',
33: 'actions' => array(
34: 'insert' => 'required',
35: 'update' => 'required',
36: ),
37: 'description' => 'e.g. Homo'
38: ),
39: 'species' => array(
40: 'colname' => 'Species',
41: 'actions' => array(
42: 'insert' => 'required',
43: 'update' => 'required',
44: ),
45: 'description' => "e.g. sapiens\nNote: the combination of genus and species need to be unique!"
46: ),
47: 'common_name' => array(
48: 'colname' => 'CommonName',
49: 'actions' => array(
50: 'insert' => 'required',
51: 'update' => 'required',
52: ),
53: 'description' => 'e.g. human'
54: ),
55: 'comment' => array(
56: 'colname' => 'Comment',
57: 'actions' => array(
58: 'insert' => 'optional',
59: 'update' => 'optional',
60: ),
61: 'description' => 'some comment'
62: ),
63: );
64: }
65:
66: 67: 68:
69: public static function CLI_commandDescription() {
70: return 'Manipulate organisms.';
71: }
72:
73: 74: 75:
76: public static function CLI_commandName() {
77: return 'organism';
78: }
79:
80: 81: 82:
83: public static function CLI_longHelp() {
84:
85: }
86:
87: 88: 89:
90: public static function getSubCommands() {
91: return array('insert', 'update', 'delete', 'details', 'list');
92: }
93:
94: 95: 96:
97: public static function getPropelClass() {
98: return '\\cli_db\\propel\\Organism';
99: }
100:
101: }
102:
103: ?>
104: