Components_Constants::getDataDirectory PHP Method

getDataDirectory() public static method

Return the position of the package data directory.
public static getDataDirectory ( ) : string
return string Path to the directory holding data files.
    public static function getDataDirectory()
    {
        if (strpos(self::DATA_DIR, '@data_dir') === 0) {
            return __DIR__ . '/../../data';
        }
        return self::DATA_DIR . '/Components';
    }

Usage Example

Example #1
0
 /**
  * Return the path to the template directory
  *
  * @return string The path to the template directory.
  */
 public function getTemplateDirectory()
 {
     $options = $this->_config->getOptions();
     if (!isset($options['templatedir'])) {
         return Components_Constants::getDataDirectory();
     } else {
         return $options['templatedir'];
     }
 }
All Usage Examples Of Components_Constants::getDataDirectory