PHP 클래스 spoon2twig

사용 중단:
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( )
comma ( string $input ) : string
convertAllFiles ( boolean $force, array $path, string | null $input = null ) Project file converter Will locate ever file in the project and convert in automagicly
dePluralize ( string $noun ) : string Converts a noun until it's ready
displayErrors ( ) Displays all Errors or notices
error ( string $message ) Error or notice collector
fromCamelToSnake ( string $input ) : string
getCorrectSourceVersion ( ) : string Get Correct version looks a the project version to find and return it's source directory
getFile ( string $input ) : string Return the file content of a given file
isFile ( string $file ) : boolean File checker
pregReplaceIterations ( string $fileData ) : string Iteration Converter
pregReplaceSprintf ( string $regex, string $format, string $fileData, $extra = null ) : string preg_replace sprint_f Combines 2 function into one that's more ideal for parsing as it string replaces any found matches with a new given value
ruleParser ( string $fileData ) : string The actual conversion
start ( array $arguments ) Start Converter
timestamp ( integer $int = null ) : float Stamps the time it takes from start to finnish
write ( string $input, string $fileData ) Write saves to content to a new file

비공개 메소드들

메소드 설명
buildFiles ( array $templatePaths, boolean $force = false ) Builds new Files from a paths array
findFiles ( string $basePath, array $path, string $input = null ) : array Find files in given paths
findThemeFiles ( string $basePath, array $path, string $theme ) : array

메소드 상세

__construct() 공개 메소드

public __construct ( )

comma() 공개 메소드

public comma ( string $input ) : string
$input string
리턴 string

convertAllFiles() 공개 메소드

Project file converter Will locate ever file in the project and convert in automagicly
public convertAllFiles ( boolean $force, array $path, string | null $input = null )
$force boolean allow forced overwrite
$path array
$input string | null

dePluralize() 공개 메소드

Converts a noun until it's ready
public dePluralize ( string $noun ) : string
$noun string a noun
리턴 string converted noun

displayErrors() 공개 메소드

Displays all Errors or notices
public displayErrors ( )

error() 공개 메소드

Error or notice collector
public error ( string $message )
$message string

fromCamelToSnake() 공개 메소드

public fromCamelToSnake ( string $input ) : string
$input string
리턴 string

getCorrectSourceVersion() 공개 메소드

Get Correct version looks a the project version to find and return it's source directory
public getCorrectSourceVersion ( ) : string
리턴 string returns the correct source dir

getFile() 공개 메소드

Return the file content of a given file
public getFile ( string $input ) : string
$input string file full path
리턴 string file content

isFile() 공개 메소드

File checker
public isFile ( string $file ) : boolean
$file string file full path
리턴 boolean

pregReplaceIterations() 공개 메소드

Iteration Converter
public pregReplaceIterations ( string $fileData ) : string
$fileData string file to convert
리턴 string file in converted form

pregReplaceSprintf() 공개 메소드

preg_replace sprint_f Combines 2 function into one that's more ideal for parsing as it string replaces any found matches with a new given value
public pregReplaceSprintf ( string $regex, string $format, string $fileData, $extra = null ) : string
$regex string the regex
$format string the replace value
$fileData string file content
리턴 string if successful returns file content with replaced data

ruleParser() 공개 메소드

The actual conversion
public ruleParser ( string $fileData ) : string
$fileData string
리턴 string

start() 공개 메소드

Start Converter
public start ( array $arguments )
$arguments array A list of arguments from php command line

timestamp() 공개 메소드

Stamps the time it takes from start to finnish
public timestamp ( integer $int = null ) : float
$int integer how precise you wish to measure
리턴 float

write() 공개 메소드

Write saves to content to a new file
public write ( string $input, string $fileData )
$input string file full path
$fileData string file content