PHP 클래스 Xinax\LaravelGettext\FileSystem

파일 보기 프로젝트 열기: xinax/laravel-gettext 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$basePath string File system base path All paths will be relative to this
$configuration Xinax\LaravelGettext\Config\Models\Config Package configuration model
$folderName string The folder name in which the language files are stored
$storageContainer string Storage directory name for view compilation
$storagePath string Storage path for file generation

공개 메소드들

메소드 설명
__construct ( Config $config, $basePath, $storagePath )
addLocale ( String $localePath, String $locale ) Adds a new locale directory + .po file
checkDirectoryStructure ( boolean | false $checkLocales = false ) : boolean Checks the required directory Optionally checks each local directory, if $checkLocales is true
clearDirectory ( string $path ) : null | boolean Removes the directory contents recursively
compileViews ( array $viewPaths, string $domain ) : boolean Build views in order to parse php files
createPOFile ( string $path, string $locale, string $domain, boolean | true $write = true ) : integer | string Creates a configured .po file on $path If PHP are not able to create the file the content will be returned instead
generateLocales ( ) : array Creates the localization directories and files by domain
getBasePath ( ) : string Get the filesystem base path
getConfiguration ( ) : Config Gets the package configuration model.
getDomainPath ( null $append = null ) : string Constructs and returns the full path to the translation files
getFolderName ( ) : string Get the folder name
getRelativePath ( string $from, string $to ) : string Return the relative path from a file or directory to anothe
getStorageForDomain ( $domain ) : String Get the full path for domain storage directory
getStoragePath ( ) : string Get the storage path
makePOFilePath ( $locale, $domain ) : string Returns the full path for a .po file from its domain and locale
setBasePath ( $basePath ) Set the filesystem base path
setConfiguration ( Config $configuration ) Set the package configuration model
setFolderName ( $folderName ) Set the folder name
setStoragePath ( $storagePath ) Set the storage path
updateLocale ( $localePath, $locale, $domain ) : boolean Update the .po file headers by domain (mainly source-file paths)

보호된 메소드들

메소드 설명
createDirectory ( $path ) Validate if the directory can be created

메소드 상세

__construct() 공개 메소드

public __construct ( Config $config, $basePath, $storagePath )
$config Xinax\LaravelGettext\Config\Models\Config
$basePath
$storagePath

addLocale() 공개 메소드

Adds a new locale directory + .po file
public addLocale ( String $localePath, String $locale )
$localePath String
$locale String

checkDirectoryStructure() 공개 메소드

Checks the required directory Optionally checks each local directory, if $checkLocales is true
public checkDirectoryStructure ( boolean | false $checkLocales = false ) : boolean
$checkLocales boolean | false
리턴 boolean

clearDirectory() 공개 정적인 메소드

Removes the directory contents recursively
public static clearDirectory ( string $path ) : null | boolean
$path string
리턴 null | boolean

compileViews() 공개 메소드

Build views in order to parse php files
public compileViews ( array $viewPaths, string $domain ) : boolean
$viewPaths array
$domain string
리턴 boolean

createDirectory() 보호된 메소드

Validate if the directory can be created
protected createDirectory ( $path )
$path

createPOFile() 공개 메소드

Creates a configured .po file on $path If PHP are not able to create the file the content will be returned instead
public createPOFile ( string $path, string $locale, string $domain, boolean | true $write = true ) : integer | string
$path string
$locale string
$domain string
$write boolean | true
리턴 integer | string

generateLocales() 공개 메소드

Creates the localization directories and files by domain
public generateLocales ( ) : array
리턴 array

getBasePath() 공개 메소드

Get the filesystem base path
public getBasePath ( ) : string
리턴 string

getConfiguration() 공개 메소드

Gets the package configuration model.
public getConfiguration ( ) : Config
리턴 Xinax\LaravelGettext\Config\Models\Config

getDomainPath() 공개 메소드

Constructs and returns the full path to the translation files
public getDomainPath ( null $append = null ) : string
$append null
리턴 string

getFolderName() 공개 메소드

Get the folder name
public getFolderName ( ) : string
리턴 string

getRelativePath() 공개 메소드

Return the relative path from a file or directory to anothe
저자: Laurent Goussard
public getRelativePath ( string $from, string $to ) : string
$from string
$to string
리턴 string

getStorageForDomain() 공개 메소드

Get the full path for domain storage directory
public getStorageForDomain ( $domain ) : String
$domain
리턴 String

getStoragePath() 공개 메소드

Get the storage path
public getStoragePath ( ) : string
리턴 string

makePOFilePath() 공개 메소드

Returns the full path for a .po file from its domain and locale
public makePOFilePath ( $locale, $domain ) : string
$locale
$domain
리턴 string

setBasePath() 공개 메소드

Set the filesystem base path
public setBasePath ( $basePath )
$basePath

setConfiguration() 공개 메소드

Set the package configuration model
public setConfiguration ( Config $configuration )
$configuration Xinax\LaravelGettext\Config\Models\Config

setFolderName() 공개 메소드

Set the folder name
public setFolderName ( $folderName )
$folderName

setStoragePath() 공개 메소드

Set the storage path
public setStoragePath ( $storagePath )
$storagePath

updateLocale() 공개 메소드

Update the .po file headers by domain (mainly source-file paths)
public updateLocale ( $localePath, $locale, $domain ) : boolean
$localePath
$locale
$domain
리턴 boolean

프로퍼티 상세

$basePath 보호되어 있는 프로퍼티

File system base path All paths will be relative to this
protected string $basePath
리턴 string

$configuration 보호되어 있는 프로퍼티

Package configuration model
protected Config,Xinax\LaravelGettext\Config\Models $configuration
리턴 Xinax\LaravelGettext\Config\Models\Config

$folderName 보호되어 있는 프로퍼티

The folder name in which the language files are stored
protected string $folderName
리턴 string

$storageContainer 보호되어 있는 프로퍼티

Storage directory name for view compilation
protected string $storageContainer
리턴 string

$storagePath 보호되어 있는 프로퍼티

Storage path for file generation
protected string $storagePath
리턴 string