forked from obophp/obo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobo.php
More file actions
54 lines (44 loc) · 2.06 KB
/
Copy pathobo.php
File metadata and controls
54 lines (44 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* This file is part of framework Obo Development version (http://www.obophp.org/)
* @link http://www.obophp.org/
* @author Adam Suba, http://www.adamsuba.cz/
* @copyright (c) 2011 - 2013 Adam Suba
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
*/
namespace obo;
class obo extends \obo\Object {
const _NAME = "obo";
const _VERSION = "development";
const _AUTHOR = "Adam Suba";
const _LICENCE = "Apache License, Version 2.0";
const _WWW = "http://www.obophp.org/";
const ENTITIES_EXPLORER = "obo-entitiesExplorer";
const ENTITIES_INFORMATION = "obo-entitiesInformation";
const IDENTITY_MAPPER = "obo-identityMapper";
const EVENT_MANAGER = "obo-eventManager";
const REPOSITORY_MAPPER = "obo-repositoryMapper";
const REPOSITORY_LAYER = "obo-repositoryLayer";
const CACHE = "obo-cache";
public static $developerMode = false;
/**
* @param \DibiConnection $repositoryLayer
*/
public static function connectToRepositoryLayer(\DibiConnection $repositoryLayer) {
\obo\Services::registerServiceWithName($repositoryLayer, self::REPOSITORY_LAYER);
}
public static function setCache(\obo\Interfaces\ICache $cache) {
\obo\Services::registerServiceWithName($cache, self::CACHE);
}
/**
* @return void
*/
public static function run() {
\obo\Services::registerServiceWithName(new \obo\Services\EntitiesInformation\Explorer(), self::ENTITIES_EXPLORER);
\obo\Services::registerServiceWithName(new \obo\Services\EntitiesInformation\Information(), self::ENTITIES_INFORMATION);
\obo\Services::registerServiceWithName(new \obo\Services\IdentityMapper\IdentityMapper, self::IDENTITY_MAPPER);
\obo\Services::registerServiceWithName(new \obo\Services\Events\EventManager, self::EVENT_MANAGER);
\obo\Services::registerServiceWithName(new \obo\RepositoryMappers\DibiRepositoryMapper, self::REPOSITORY_MAPPER);
\obo\Annotation\CoreAnnotations::register(\obo\Services::serviceWithName(self::ENTITIES_EXPLORER));
}
}