コード例 #1
0
ファイル: ConfigDirectory.php プロジェクト: gobjila/BackBee
 /**
  * Returns ordered directory (from specific to global) which can contains the bootstrap.yml file
  * according to context and environment.
  *
  * @return array which contains every directory (string) where we can find the bootstrap.yml
  */
 public static function getDirectories($bb_directory = null, $repository_directory, $context, $environment)
 {
     $directories = BootstrapDirectory::getDirectories($repository_directory, $context, $environment);
     if (null !== $bb_directory) {
         array_push($directories, $bb_directory . DIRECTORY_SEPARATOR . 'Config');
     }
     $directories = array_reverse($directories);
     return $directories;
 }
コード例 #2
0
 /**
  * Returns ordered directory (from global to specific) which can contains the bundle config files
  * according to context and environment.
  *
  * @return array which contains every directory (string) where we can find the bundle config files
  */
 public static function getDirectories($base_directory, $context, $environment, $bundle_id)
 {
     $directories = array();
     foreach (BootstrapDirectory::getDirectories($base_directory, $context, $environment) as $directory) {
         $directory .= DIRECTORY_SEPARATOR . self::OVERRIDE_BUNDLE_CONFIG_DIRECTORY_NAME . DIRECTORY_SEPARATOR . $bundle_id;
         if (true === is_dir($directory)) {
             array_unshift($directories, $directory);
         }
     }
     return $directories;
 }