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\Api;
40: use MOC\Generic\Device\Adapter;
41: use MOC\Extension\Excel\Instance as Excel;
42: use MOC\Extension\Mail\Instance as Mail;
43: use MOC\Extension\Pdf\Instance as Pdf;
44: use MOC\Extension\Word\Instance as Word;
45: use MOC\Extension\Xml\Instance as Xml;
46: use MOC\Extension\YUICompressor\Instance as YUICompressor;
47: use MOC\Extension\Zip\Instance as Zip;
48: 49: 50:
51: class Extension implements Adapter {
52:
53:
54: private static $Singleton = null;
55:
56: 57: 58: 59: 60: 61:
62: public static function InterfaceInstance() {
63: if( self::$Singleton === null ) {
64: self::$Singleton = new Extension();
65: } return self::$Singleton;
66: }
67:
68: 69: 70: 71: 72: 73:
74: public static function InterfaceDepending() {
75: return Api::Core()->Depending()
76: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Extension\Excel' )
77: ->SetClass( 'Instance' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
78: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Extension\Mail' )
79: ->SetClass( 'Instance' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
80: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Extension\Pdf' )
81: ->SetClass( 'Instance' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
82: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Extension\Word' )
83: ->SetClass( 'Instance' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
84: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Extension\Xml' )
85: ->SetClass( 'Instance' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
86: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Extension\YUICompressor' )
87: ->SetClass( 'Instance' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
88: ->AddPackage( Api::Core()->Depending()->NewPackage()->SetNamespace( 'MOC\Extension\Zip' )
89: ->SetClass( 'Instance' )->SetOptional( false )->SetVersion( Api::Core()->Version() ) )
90: ;
91: }
92:
93: 94: 95: 96: 97: 98:
99: public static function InterfaceChangelog() {
100: return Api::Core()->Changelog()->Create( __CLASS__ )
101: ->Build()->Clearance( '03.06.2013 15:16', 'Development' )
102: ->Fix()->DocFix( '03.06.2013 15:17', 'Dependencies' )
103: ;
104: }
105:
106: 107: 108:
109: public function Excel() {
110: return Excel::InterfaceInstance();
111: }
112:
113: 114: 115:
116: public function Mail() {
117: return Mail::InterfaceInstance();
118: }
119:
120: 121: 122:
123: public function Pdf() {
124: return Pdf::InterfaceInstance();
125: }
126:
127: 128: 129:
130: public function Word() {
131: return Word::InterfaceInstance();
132: }
133:
134: 135: 136:
137: public function Xml() {
138: return Xml::InterfaceInstance();
139: }
140:
141: 142: 143:
144: public function Zip() {
145: return Zip::InterfaceInstance();
146: }
147:
148: 149: 150:
151: public function YUICompressor() {
152: return YUICompressor::InterfaceInstance();
153: }
154: }
155: