ODDMetaData::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 6
dl 0
loc 10
ccs 0
cts 9
cp 0
crap 2
rs 9.9332
c 0
b 0
f 0
1
<?php
2
/**
3
 * ODD Metadata class.
4
 *
5
 * @package    Elgg.Core
6
 * @subpackage ODD
7
 * @deprecated 1.9
8
 */
9
class ODDMetaData extends ODD {
0 ignored issues
show
Deprecated Code introduced by
The class ODD has been deprecated with message: 1.9

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
10
11
	/**
12
	 * New ODD metadata
13
	 *
14
	 * @param string $uuid        Unique ID
15
	 * @param string $entity_uuid Another unique ID
16
	 * @param string $name        Name
17
	 * @param string $value       Value
18
	 * @param string $type        Type
19
	 * @param string $owner_uuid  Owner ID
20
	 */
21
	function __construct($uuid, $entity_uuid, $name, $value, $type = "", $owner_uuid = "") {
22
		parent::__construct();
23
24
		$this->setAttribute('uuid', $uuid);
25
		$this->setAttribute('entity_uuid', $entity_uuid);
26
		$this->setAttribute('name', $name);
27
		$this->setAttribute('type', $type);
28
		$this->setAttribute('owner_uuid', $owner_uuid);
29
		$this->setBody($value);
30
	}
31
32
	/**
33
	 * Returns 'metadata'
34
	 *
35
	 * @return string 'metadata'
36
	 */
37
	protected function getTagName() {
38
		return "metadata";
39
	}
40
}
41