Completed
Push — master ( f7e1a1...08e5a8 )
by Thomas
06:02
created

ApplicationUri   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 4
c 4
b 0
f 0
lcom 1
cbo 1
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSerializer() 0 7 2
A getUrl() 0 6 2
1
<?php
2
namespace keeko\core\model;
3
4
use keeko\core\model\Base\ApplicationUri as BaseApplicationUri;
5
use keeko\core\serializer\ApplicationUriSerializer;
6
use keeko\framework\model\ApiModelInterface;
7
8
/**
9
 * Skeleton subclass for representing a row from the 'kk_application_uri' table.
10
 *
11
 * You should add additional methods to this class to meet the
12
 * application requirements.  This class will only be generated as
13
 * long as it does not already exist in the output directory.
14
 */
15
class ApplicationUri extends BaseApplicationUri implements ApiModelInterface {
16
17
	/**
18
	 */
19
	private static $serializer;
20
21
	/**
22
	 * @return ApplicationUriSerializer
23
	 */
24
	public static function getSerializer() {
25
		if (self::$serializer === null) {
26
			self::$serializer = new ApplicationUriSerializer();
27
		}
28
29
		return self::$serializer;
30
	}
31
	
32
	public function getUrl() {
33
		return sprintf('http%s://%s%s',
34
			$this->getSecure() ? 's' : '',
35
			$this->getHttphost(),
36
			$this->getBasepath());
37
	}
38
}
39