Overview

Namespaces

  • MOC
    • Adapter
    • Core
      • Changelog
      • Depending
      • Drive
        • Directory
        • File
      • Error
        • Register
        • Type
      • Journal
      • Proxy
      • Template
      • Xml
    • Extension
      • Excel
      • Flot
      • Mail
      • Pdf
      • Word
      • Xml
      • YUICompressor
      • Zip
    • Generic
      • Common
      • Device
        • Extension
        • Widget
    • Module
      • Database
        • Driver
      • Drive
      • Image
        • Font
      • Installer
      • Network
        • Ftp
          • Directory
          • File
          • Transport
        • Http
        • ParcelTracker
          • Carrier
      • Office
        • Chart
          • Axis
        • Document
          • Excel
            • Cell
              • Format
              • Style
                • Border
                  • Bottom
                  • Left
                  • Right
                  • Top
                • Font
            • Close
            • Page
            • Worksheet
          • Pdf
            • Close
            • Font
            • Page
              • Margin
              • Position
            • Text
          • Xml
            • Close
        • Image
        • Mail
          • Address
          • Content
      • Packer
        • Yui
        • Zip
      • Template
    • Plugin
      • Gateway
      • Repository
      • Shared
  • PHP

Classes

  • Core
  • Extension
  • Module
  • Plugin
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: /**
  3:  * LICENSE (BSD)
  4:  *
  5:  * Copyright (c) 2012, Gerd Christian Kunze
  6:  * All rights reserved.
  7:  *
  8:  * Redistribution and use in source and binary forms, with or without
  9:  * modification, are permitted provided that the following conditions are
 10:  * met:
 11:  *
 12:  *  * Redistributions of source code must retain the above copyright
 13:  *    notice, this list of conditions and the following disclaimer.
 14:  *
 15:  *  * Redistributions in binary form must reproduce the above copyright
 16:  *    notice, this list of conditions and the following disclaimer in the
 17:  *    documentation and/or other materials provided with the distribution.
 18:  *
 19:  *  * Neither the name of Gerd Christian Kunze nor the names of the
 20:  *    contributors may be used to endorse or promote products derived from
 21:  *    this software without specific prior written permission.
 22:  *
 23:  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 24:  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 25:  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 26:  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 27:  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 28:  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 29:  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 30:  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 31:  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 32:  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 33:  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 34:  *
 35:  * Core
 36:  * 29.08.2012 15:25
 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:  * Class which provides an interface to the Core functionality of MOC
 56:  */
 57: class Core implements Adapter {
 58: 
 59:     /** @var Core $Singleton */
 60:     private static $Singleton = null;
 61: 
 62:     /**
 63:      * Get Singleton/Instance
 64:      *
 65:      * @static
 66:      * @return  Core
 67:      */
 68:     public static function InterfaceInstance() {
 69:         if( self::$Singleton === null ) {
 70:             self::$Singleton = new Core();
 71:         } return self::$Singleton;
 72:     }
 73: 
 74:     /**
 75:      * Get Dependencies
 76:      *
 77:      * @static
 78:      * @return Depending
 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:      * Get Changelog
111:      *
112:      * @static
113:      * @return Changelog
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:      * @return Depending
124:      */
125:     public function Depending() {
126:         return Depending::InterfaceInstance();
127:     }
128: 
129:     /**
130:      * @return Version
131:      */
132:     public function Version() {
133:         return Version::InterfaceInstance();
134:     }
135: 
136:     /**
137:      * @return Changelog
138:      */
139:     public function Changelog() {
140:         return Changelog::InterfaceInstance();
141:     }
142: 
143:     /**
144:      * @return Cache
145:      */
146:     public function Cache() {
147:         return Cache::InterfaceInstance();
148:     }
149: 
150:     /**
151:      * @return Drive
152:      */
153:     public function Drive() {
154:         return Drive::InterfaceInstance();
155:     }
156: 
157:     /**
158:      * @return Encoding
159:      */
160:     public function Encoding() {
161:         return Encoding::InterfaceInstance();
162:     }
163: 
164:     /**
165:      * @return Error
166:      */
167:     public function Error() {
168:         return Error::InterfaceInstance();
169:     }
170: 
171:     /**
172:      * @return Journal
173:      */
174:     public function Journal() {
175:         return Journal::InterfaceInstance();
176:     }
177: 
178:     /**
179:      * @return Proxy
180:      */
181:     public function Proxy() {
182:         return Proxy::InterfaceInstance();
183:     }
184: 
185:     /**
186:      * @return Session
187:      */
188:     public function Session() {
189:         return Session::InterfaceInstance();
190:     }
191: 
192:     /**
193:      * @return Xml
194:      */
195:     public function Xml() {
196:         return Xml::InterfaceInstance();
197:     }
198: 
199:     /**
200:      * @return Template
201:      */
202:     public function Template() {
203:         return Template::InterfaceInstance();
204:     }
205: }
206: 
API documentation generated by ApiGen 2.8.0