1: <?php
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: namespace MOC\Adapter;
39: use MOC\Generic\Device\Adapter;
40: use MOC\Api;
41: use MOC\Core\Cache;
42: use MOC\Core\Changelog;
43: use MOC\Core\Depending;
44: use MOC\Core\Drive;
45: use MOC\Core\Encoding;
46: use MOC\Core\Error;
47: use MOC\Core\Journal;
48: use MOC\Core\Proxy;
49: use MOC\Core\Session;
50: use MOC\Core\Template;
51: use MOC\Core\Version;
52: use MOC\Core\Xml;
53:
54: 55: 56:
57: class Core implements Adapter {
58:
59:
60: private static $Singleton = null;
61:
62: 63: 64: 65: 66: 67:
68: public static function InterfaceInstance() {
69: if( self::$Singleton === null ) {
70: self::$Singleton = new Core();
71: } return self::$Singleton;
72: }
73:
74: 75: 76: 77: 78: 79:
80: public static function InterfaceDepending() {
81: return Api::Core()->Depending()
82: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
83: ->SetClass( 'Cache' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
84: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
85: ->SetClass( 'Changelog' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
86: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
87: ->SetClass( 'Depending' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
88: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
89: ->SetClass( 'Drive' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
90: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
91: ->SetClass( 'Encoding' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
92: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
93: ->SetClass( 'Error' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
94: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
95: ->SetClass( 'Journal' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
96: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
97: ->SetClass( 'Proxy' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
98: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
99: ->SetClass( 'Session' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
100: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
101: ->SetClass( 'Template' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
102: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
103: ->SetClass( 'Version' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
104: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Core' )
105: ->SetClass( 'Xml' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
106: ;
107: }
108:
109: 110: 111: 112: 113: 114:
115: public static function InterfaceChangelog() {
116: return Api::Core()->Changelog()->Create( __CLASS__ )
117: ->Build()->Clearance( '03.06.2013 14:59', 'Development' )
118: ->Fix()->DocFix( '03.06.2013 15:00', 'Dependencies' )
119: ;
120: }
121:
122: 123: 124:
125: public function Depending() {
126: return Depending::InterfaceInstance();
127: }
128:
129: 130: 131:
132: public function Version() {
133: return Version::InterfaceInstance();
134: }
135:
136: 137: 138:
139: public function Changelog() {
140: return Changelog::InterfaceInstance();
141: }
142:
143: 144: 145:
146: public function Cache() {
147: return Cache::InterfaceInstance();
148: }
149:
150: 151: 152:
153: public function Drive() {
154: return Drive::InterfaceInstance();
155: }
156:
157: 158: 159:
160: public function Encoding() {
161: return Encoding::InterfaceInstance();
162: }
163:
164: 165: 166:
167: public function Error() {
168: return Error::InterfaceInstance();
169: }
170:
171: 172: 173:
174: public function Journal() {
175: return Journal::InterfaceInstance();
176: }
177:
178: 179: 180:
181: public function Proxy() {
182: return Proxy::InterfaceInstance();
183: }
184:
185: 186: 187:
188: public function Session() {
189: return Session::InterfaceInstance();
190: }
191:
192: 193: 194:
195: public function Xml() {
196: return Xml::InterfaceInstance();
197: }
198:
199: 200: 201:
202: public function Template() {
203: return Template::InterfaceInstance();
204: }
205: }
206: