PHP 클래스 App\services\Utils

파일 보기 프로젝트 열기: printempw/blessing-skin-server 1 사용 예제들

공개 메소드들

메소드 설명
download ( $url, $path )
generateRndString ( integer $length, boolean $special_chars = true ) : string Generate random string
getRemoteFileSize ( $url )
getStringReplaced ( string $str, array $rules ) : string Replace content of string according to given rules
getTimeFormatted ( $timestamp )
upload ( array $file ) : string Rename uploaded file

메소드 상세

download() 공개 정적인 메소드

public static download ( $url, $path )

generateRndString() 공개 정적인 메소드

Generate random string
public static generateRndString ( integer $length, boolean $special_chars = true ) : string
$length integer
$special_chars boolean
리턴 string

getRemoteFileSize() 공개 정적인 메소드

public static getRemoteFileSize ( $url )

getStringReplaced() 공개 정적인 메소드

Replace content of string according to given rules
public static getStringReplaced ( string $str, array $rules ) : string
$str string
$rules array
리턴 string

getTimeFormatted() 공개 정적인 메소드

public static getTimeFormatted ( $timestamp )

upload() 공개 정적인 메소드

Rename uploaded file
public static upload ( array $file ) : string
$file array files uploaded via HTTP POST
리턴 string $hash sha256 hash of file