lithium\g11n\catalog\adapter\Php::_file PHP Method

_file() protected method

Helper method for transforming a category, locale and scope into a filename.
protected _file ( string $category, string $locale, string $scope ) : string
$category string Category name.
$locale string Locale identifier.
$scope string Current operation scope.
return string Filename.
    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";
    }