PHP 클래스 PHPFusion\ImageRepo

파일 보기 프로젝트 열기: php-fusion/PHP-Fusion 1 사용 예제들

공개 메소드들

메소드 설명
getFileList ( $path ) : array Given a path, returns an array of all files
getImage ( string $image, string $alt = "", string $style = "", string $title = "", string $atts = "" ) : string Get the imagepath or the html "img" tag
getImagePaths ( ) : string[] Get all imagepaths
replaceInAllPath ( string $source, string $target ) Replace a part in each path
setImage ( string $name, string $path ) Set a path of an image

비공개 메소드들

메소드 설명
cache ( ) Fetch and cache all off the imagepaths

메소드 상세

getFileList() 공개 정적인 메소드

Given a path, returns an array of all files
public static getFileList ( $path ) : array
$path
리턴 array

getImage() 공개 정적인 메소드

Get the imagepath or the html "img" tag
public static getImage ( string $image, string $alt = "", string $style = "", string $title = "", string $atts = "" ) : string
$image string The name of the image.
$alt string "alt" attribute of the image
$style string "style" attribute of the image
$title string "title" attribute of the image
$atts string Custom attributes of the image
리턴 string The path of the image if the first argument is given, but others not. Otherwise the html "img" tag

getImagePaths() 공개 정적인 메소드

Get all imagepaths
public static getImagePaths ( ) : string[]
리턴 string[]

replaceInAllPath() 공개 정적인 메소드

Replace a part in each path
public static replaceInAllPath ( string $source, string $target )
$source string
$target string

setImage() 공개 정적인 메소드

Set a path of an image
public static setImage ( string $name, string $path )
$name string
$path string