Variable::define()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
/**
4
 * @package Cadmium\System\Modules\Entitizer
5
 * @author Anton Romanov
6
 * @copyright Copyright (c) 2015-2017, Anton Romanov
7
 * @link http://cadmium-cms.com
8
 */
9
10
namespace Modules\Entitizer\Definition {
11
12
	use Modules\Entitizer;
13
14
	class Variable extends Entitizer\Utils\Definition {
15
16
		use Entitizer\Common\Variable;
17
18
		/**
19
		 * Define the entity fields
20
		 */
21
22
		protected function define() {
23
24
			# Add params
25
26
			$this->params->addTextual       ('name',                true, 255, false, '');
27
			$this->params->addTextual       ('title',               true, 255, false, '');
28
			$this->params->addTextual       ('value',               true, 255, false, '');
29
30
			# Add indexes
31
32
			$this->indexes->add             ('name',                'UNIQUE');
33
			$this->indexes->add             ('title');
34
		}
35
	}
36
}
37