lithium\g11n\catalog\adapter\Php::_file()

protected method

Helper method for transforming a category, locale and scope into a filename.

Parameters

  • string $category

    Category name.

  • string $locale

    Locale identifier.

  • string $scope

    Current operation scope.

Returns

string

Filename.

Source

	protected function _file($category, $locale, $scope) {
		$path = $this->_config['path'];
		$scope = $scope ?: 'default';

		if (($pos = strpos($category, 'Template')) !== false) {
			$category = substr($category, 0, $pos);
			return "{$path}/{$category}_{$scope}.php";
		}
		return "{$path}/{$locale}/{$category}/{$scope}.php";
	}