Add getVendorDir() in favor of constant ICINGAWEB_VENDORS

This commit is contained in:
Eric Lippmann 2014-11-13 09:38:04 +01:00
parent bfa834fc3b
commit f427577067
1 changed files with 38 additions and 21 deletions

View File

@ -56,6 +56,27 @@ abstract class ApplicationBootstrap
*/
protected $appDir;
/**
* Vendor library directory
*
* @var string
*/
protected $vendorDir;
/**
* Library directory
*
* @var string
*/
protected $libDir;
/**
* Configuration directory
*
* @var string
*/
protected $configDir;
/**
* Icinga auto loader
*
@ -63,13 +84,6 @@ abstract class ApplicationBootstrap
*/
private $loader;
/**
* Library directory
*
* @var string
*/
private $libDir;
/**
* Config object
*
@ -77,13 +91,6 @@ abstract class ApplicationBootstrap
*/
protected $config;
/**
* Configuration directory
*
* @var string
*/
private $configDir;
/**
* Module manager
*
@ -118,9 +125,7 @@ abstract class ApplicationBootstrap
}
$this->baseDir = $baseDir;
$this->appDir = $baseDir . '/application';
define('ICINGAWEB_VENDORS', $baseDir . '/library/vendor');
$this->vendorDir = $baseDir . '/library/vendor';
$this->libDir = realpath(__DIR__ . '/../..');
if ($configDir === null) {
@ -242,15 +247,27 @@ abstract class ApplicationBootstrap
}
/**
* Getter for config dir
* Get the vendor library directory
*
* @param string $subdir
* @param string $subDir Optional sub directory to get
*
* @return string
*/
public function getConfigDir($subdir = null)
public function getVendorDir($subDir = null)
{
return $this->getDirWithSubDir($this->configDir, $subdir);
return $this->getDirWithSubDir($this->vendorDir, $subDir);
}
/**
* Get the configuration directory
*
* @param string $subDir Optional sub directory to get
*
* @return string
*/
public function getConfigDir($subDir = null)
{
return $this->getDirWithSubDir($this->configDir, $subDir);
}
/**