Changeset 4458 for sandbox/2.2.0.2/API
- Timestamp:
- 05/19/11 14:26:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/API/class.servicelocator.php
r4445 r4458 1 1 <?php 2 /** 3 * 4 * Copyright (C) 2011 Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 5 * 6 * This program is free software; you can redistribute it and/or modify it under 7 * the terms of the GNU Affero General Public License version 3 as published by 8 * the Free Software Foundation with the addition of the following permission 9 * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED 10 * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE 11 * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. 12 * 13 * This program is distributed in the hope that it will be useful, but WITHOUT 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 16 * details. 17 * 18 * You should have received a copy of the GNU Affero General Public License 19 * along with this program; if not, see www.gnu.org/licenses or write to 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 21 * MA 02110-1301 USA. 22 * 23 * This code is based on the OpenXchange Connector and on the Prognus pSync 24 * Connector both developed by the community and licensed under the GPL 25 * version 2 or above as published by the Free Software Foundation. 26 * 27 * You can contact Prognus Software Livre headquarters at Av. Tancredo Neves, 28 * 6731, PTI, Bl. 05, Esp. 02, Sl. 10, Foz do Iguaçu - PR - Brasil or at 29 * e-mail address prognus@prognus.com.br. 30 * 31 * 32 * Faz a localização dos serviços que serão utilizados pela aplicação e que estão localizados na API 33 * 34 * 35 * @package expressoMail 36 * @license http://www.gnu.org/copyleft/gpl.html GPL 37 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 38 * @since Arquivo disponibilizado na versão 2.2 39 */ 2 40 3 41 //Helper function and defines that must be moved to a common area 4 42 ///////////////////////////////////////////////////// 5 6 43 if(!function_exists('define_once') ) 7 44 { … … 26 63 27 64 ///////////////////////////////////////////////////// 65 /** 66 * Faz a localização dos serviços que serão utilizados pela aplicação e que estão localizados na API 67 * 68 * @package expressoMail 69 * @license http://www.gnu.org/copyleft/gpl.html GPL 70 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 71 * @version 1.0 72 */ 28 73 class ServiceLocator 29 74 { … … 38 83 // static $empty_locator = new ServiceLocator( 'empty' ); 39 84 40 static function load( $configuration ) 85 86 /** 87 * Carrega a configuração 88 * 89 * @license http://www.gnu.org/copyleft/gpl.html GPL 90 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 91 * @param $configuration 92 */ 93 static function load( $configuration ) 41 94 { 42 95 $configuration = SERVICES.$configuration; … … 53 106 } 54 107 108 109 /** 110 * Deploy 111 * 112 * @license http://www.gnu.org/copyleft/gpl.html GPL 113 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 114 * @param $serviceType 115 * @param $serviceName 116 */ 55 117 static function deploy( $serviceType, $serviceName = null ) 56 118 { … … 65 127 } 66 128 67 //make all the treatment of 129 130 /** 131 * make all the treatment of 132 * 133 * @license http://www.gnu.org/copyleft/gpl.html GPL 134 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 135 * @param $service 136 * @param $object 137 */ 68 138 static function register( $service, $object ) 69 139 { … … 75 145 } 76 146 147 148 /** 149 * unregister service 150 * 151 * @license http://www.gnu.org/copyleft/gpl.html GPL 152 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 153 * @param $service 154 */ 77 155 static function unregister( $service ) 78 156 { … … 84 162 } 85 163 86 //implement 164 /** 165 * configure 166 * 167 * @license http://www.gnu.org/copyleft/gpl.html GPL 168 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 169 * @param $service 170 */ 87 171 static function configure( $service ) 88 172 { … … 90 174 } 91 175 176 /** 177 * locate 178 * 179 * @license http://www.gnu.org/copyleft/gpl.html GPL 180 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 181 * @param $service 182 * @param $arguments 183 * @param $target 184 */ 92 185 static function locate( $service, $arguments = array(), $target = false ) 93 186 { … … 126 219 } 127 220 221 222 /** 223 * construct 224 * 225 * @license http://www.gnu.org/copyleft/gpl.html GPL 226 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 227 * @param $serviceName 228 * @param $object 229 */ 128 230 function __construct( $serviceName, $object ) 129 231 { … … 132 234 } 133 235 236 237 /** 238 * proxy 239 * 240 * @license http://www.gnu.org/copyleft/gpl.html GPL 241 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 242 * @param $method 243 * @param $arguments 244 */ 134 245 function proxy( $method, $arguments ) 135 246 { … … 157 268 } 158 269 270 271 /** 272 * call 273 * 274 * @license http://www.gnu.org/copyleft/gpl.html GPL 275 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 276 */ 159 277 function call() 160 278 { … … 172 290 } 173 291 292 293 /** 294 * dispatch 295 * 296 * @license http://www.gnu.org/copyleft/gpl.html GPL 297 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 298 * @param $service 299 * @param $arguments 300 */ 174 301 function dispatch( $service, $arguments ) 175 302 { … … 183 310 } 184 311 312 313 /** 314 * call 315 * 316 * @license http://www.gnu.org/copyleft/gpl.html GPL 317 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 318 * @param $method 319 * @param $arguments 320 */ 185 321 function __call( $method, $arguments ) 186 322 { … … 188 324 } 189 325 326 327 /** 328 * get 329 * 330 * @license http://www.gnu.org/copyleft/gpl.html GPL 331 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 332 * @param $name 333 */ 190 334 function __get( $name ) 191 335 { … … 193 337 } 194 338 339 340 /** 341 * call static 342 * 343 * @license http://www.gnu.org/copyleft/gpl.html GPL 344 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 345 * @param $method 346 * @param $arguments 347 */ 195 348 static function __callStatic( $method, $arguments ) 196 349 { … … 198 351 } 199 352 353 354 /** 355 * get service 356 * 357 * @license http://www.gnu.org/copyleft/gpl.html GPL 358 * @author Consórcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br) 359 * @param $service 360 */ 200 361 static function getService( $service ) 201 362 {
Note: See TracChangeset
for help on using the changeset viewer.