library/core/class.gdn.php
public static function FactoryInstallFromConfig($Config, $Alias = NULL) {
      if (is_string($Config))
         $Config = self::Config($Config);
      if (is_null($Alias))
         $Alias = $Config['Alias'];
         
      $FactoryType = $Config['FactoryType'];
      $Data = ArrayValue('Data', $Config, NULL);
      $Override = ArrayValue('Override', $Config, TRUE);
         
      self::FactoryInstall($Alias, $Config['ClassName'], $Config['Path'], $FactoryType, $Data, $Override);
      
      if (array_key_exists('Dependencies', $Config)) {
         $Dependencies = $Config['Dependencies'];
         foreach($Dependencies as $Index => $DependencyConfig) {
            self::FactoryInstallFromConfig($DependencyConfig, $Alias);
         }
      }
   }
public static function FactoryInstallFromConfig($Config, $Alias = NULL) {
      if (is_string($Config))
         $Config = self::Config($Config);
      if (is_null($Alias))
         $Alias = $Config['Alias'];
         
      $FactoryType = $Config['FactoryType'];
      $Data = ArrayValue('Data', $Config, NULL);
      $Override = ArrayValue('Override', $Config, TRUE);
         
      self::FactoryInstall($Alias, $Config['ClassName'], $Config['Path'], $FactoryType, $Data, $Override);
      
      if (array_key_exists('Dependencies', $Config)) {
         $Dependencies = $Config['Dependencies'];
         foreach($Dependencies as $Index => $DependencyConfig) {
            self::FactoryInstallFromConfig($DependencyConfig, $Alias);
         }
      }
   }
public static function FactoryInstallFromConfig ( $ Config , $ Alias = NULL ) { if ( is_string ( $ Config ) ) $ Config = self :: Config ( $ Config ) ; if ( is_null ( $ Alias ) ) $ Alias = $ Config [ 'Alias' ] ; $ FactoryType = $ Config [ 'FactoryType' ] ; $ Data = ArrayValue ( 'Data' , $ Config , NULL ) ; $ Override = ArrayValue ( 'Override' , $ Config , TRUE ) ; self :: FactoryInstall ( $ Alias , $ Config [ 'ClassName' ] , $ Config [ 'Path' ] , $ FactoryType , $ Data , $ Override ) ; if ( array_key_exists ( 'Dependencies' , $ Config ) ) { $ Dependencies = $ Config [ 'Dependencies' ] ; foreach ( $ Dependencies as $ Index => $ DependencyConfig ) { self :: FactoryInstallFromConfig ( $ DependencyConfig , $ Alias ) ; } } }
Installs a class to the factory with the settings from a configuration.

@param mixed $Config The configuration of the factory definition. This argument can be of the following types:
- <b>string</b>: The configuration will be looked up by calling inline{@link Gdn::Config()}
- <b>array</b>: The configuration will be set from the array.
@param string $Alias The class alias to install into the factory. If omitted then it must be in the configuration.

The factory will be installed from the configuration array depending on the following keys:
- <b>Alias</b>: Optional if $Alias is passed as an argument.
- <b>FactoryType</b>: Required.
- <b>Data</b>: Optional.
- <b>Override</b> Optional.
- <b>Dependencies</b> Optional. Dependencies for the class can be defined as a subarray. Each item in the subarray will be passed to inline{@link Gdn::FactoryInstallDependencyFromConfig}.
All of these values (except Dependencies) are passed to the corresponding argument in inline{@link Gdn::FactoryInstall()}.
Installs a class to the factory with the settings from a configuration .