/** * Loads and parses a user created ini file into a set (object, array), then returns the set. * * @access public * @param string $file * @param string $format * @return object|array * @static */ public static function generate($file, $format = self::GENERATE_ARRAY) { $path = CONFIG . 'sets' . DS . Inflector::filename($file, 'ini'); if (file_exists($path)) { $config = parse_ini_file($path, true, INI_SCANNER_NORMAL); $config = Set::expand($config); if ($format === self::GENERATE_OBJECT) { $config = Set::toObject($config); } return $config; } return null; }
/** * Build out the path based on the passed router parameters. * * @access public * @param string $base * @return string */ public final function routedPath($base) { $path = $base; if (!empty($this->_config['container'])) { $path .= $this->_config['container'] . DS; } $path .= Inflector::filename($this->_config['controller']); return $path; }