Beispiel #1
0
 /**
  * Mounts the facades by extracting information from the service builder config and using creating class aliases
  *
  * @param string|null $targetNamespace Namespace that the facades should be mounted to. Defaults to global namespace
  *
  * @param Aws $serviceBuilder
  */
 public static function mountFacades(Aws $serviceBuilder, $targetNamespace = null)
 {
     self::$serviceBuilder = $serviceBuilder;
     require_once __DIR__ . '/facade-classes.php';
     foreach ($serviceBuilder->getConfig() as $service) {
         if (isset($service['alias'], $service['class'])) {
             $facadeClass = __NAMESPACE__ . '\\' . $service['alias'];
             $facadeAlias = ltrim($targetNamespace . '\\' . $service['alias'], '\\');
             if (!class_exists($facadeAlias) && class_exists($facadeClass)) {
                 // @codeCoverageIgnoreStart
                 class_alias($facadeClass, $facadeAlias);
                 // @codeCoverageIgnoreEnd
             }
         }
     }
 }
 /**
  * Returns the configuration for the service builder
  *
  * @return array 
  * @static 
  */
 public static function getConfig()
 {
     return \Aws\Common\Aws::getConfig();
 }