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

ApplicationUri::getUrl()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 2
eloc 5
nc 1
nop 0
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