Completed
Push — master ( 0c7c34...b7f628 )
by
unknown
02:49
created

GenericMetadata::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
//[PHPCOMPRESSOR(remove,start)]
3
namespace samsoncms\api\generator\metadata;
4
5
/**
6
 * Created by Vitaly Iegorov <[email protected]>.
7
 * on 22.03.16 at 19:15
8
 */
9
class GenericMetadata
10
{
11
    /** @var array Collection of all metadata instances */
12
    public static $instances = array();
13
14
    /** @var string Transliterated and CapsCase database entity name */
15
    public $entity;
16
17
    /** @var string Real entity name */
18
    public $entityName;
19
20
    /** @var string Fully qualified entity class name */
21
    public $entityClassName;
22
23
    /** Old ActiveRecord fields */
24
    /** @deprecated */
25
    public $arSelect = array();
26
    /** @deprecated */
27
    public $arMap = array();
28
    /** @deprecated */
29
    public $arAttributes = array();
30
    /** @deprecated */
31
    public $arTableAttributes = array();
32
    /** @deprecated */
33
    public $arTypes = array();
34
    /** @deprecated */
35
    public $arFrom = array();
36
    /** @deprecated */
37
    public $arGroup = array();
38
    /** @deprecated */
39
    public $arRelationAlias = array();
40
    /** @deprecated */
41
    public $arRelationType = array();
42
    /** @deprecated */
43
    public $arRelations = array();
44
45
    public function __construct(string $className)
46
    {
47
        self::$instances[ltrim($className, '\\')] = $this;
48
        $this->entityClassName = $className;
49
    }
50
}
51
//[PHPCOMPRESSOR(remove,end)]
52