PHP 클래스 Knp\Bundle\KnpBundlesBundle\Badge\BadgeGenerator

파일 보기 프로젝트 열기: KnpLabs/KnpBundles

보호된 프로퍼티들

프로퍼티 타입 설명
$cacheDir string Get app cache dir
$font string Get default font
$position array Determine score points position
$rootDir string Get app root dir
$type array Get badge type

공개 메소드들

메소드 설명
__construct ( Imagine\Image\ImagineInterface $imagine, null | Symfony\Component\Filesystem\Filesystem $filesystem = null ) Constructor
generate ( Bundle $bundle ) Generate Badge images
setCacheDir ( string $cacheDir )
setRootDir ( string $rootDir )
show ( Bundle $bundle, string $type = 'long', boolean $regenerate = false ) : string

보호된 메소드들

메소드 설명
createBadgesDir ( ) Check and create a dir for uploaded badges
getBadgeFile ( Bundle $bundle, string $type = self::LONG ) : string Get badge image full path
getPositionByType ( integer | string $score, string $type ) : Imagine\Image\Point Get score points position x:y
getResourceDir ( ) : string
setFont ( Imagine\Image\ImagineInterface $imagine, string $font, integer $size, string $color = 'ffffff' ) : string Return full font path
shorten ( string $name, integer $length ) : string Trim long bundle name

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Imagine\Image\ImagineInterface $imagine, null | Symfony\Component\Filesystem\Filesystem $filesystem = null )
$imagine Imagine\Image\ImagineInterface
$filesystem null | Symfony\Component\Filesystem\Filesystem

createBadgesDir() 보호된 메소드

Check and create a dir for uploaded badges
protected createBadgesDir ( )

generate() 공개 메소드

Generate Badge images
public generate ( Bundle $bundle )
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle

getBadgeFile() 보호된 메소드

Get badge image full path
protected getBadgeFile ( Bundle $bundle, string $type = self::LONG ) : string
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle
$type string
리턴 string

getPositionByType() 보호된 메소드

Get score points position x:y
protected getPositionByType ( integer | string $score, string $type ) : Imagine\Image\Point
$score integer | string
$type string
리턴 Imagine\Image\Point

getResourceDir() 보호된 메소드

protected getResourceDir ( ) : string
리턴 string

setCacheDir() 공개 메소드

public setCacheDir ( string $cacheDir )
$cacheDir string

setFont() 보호된 메소드

Return full font path
protected setFont ( Imagine\Image\ImagineInterface $imagine, string $font, integer $size, string $color = 'ffffff' ) : string
$imagine Imagine\Image\ImagineInterface
$font string
$size integer
$color string
리턴 string

setRootDir() 공개 메소드

public setRootDir ( string $rootDir )
$rootDir string

shorten() 보호된 메소드

Trim long bundle name
protected shorten ( string $name, integer $length ) : string
$name string
$length integer symbol count from the end
리턴 string

show() 공개 메소드

public show ( Bundle $bundle, string $type = 'long', boolean $regenerate = false ) : string
$bundle Knp\Bundle\KnpBundlesBundle\Entity\Bundle
$type string
$regenerate boolean
리턴 string

프로퍼티 상세

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

Get app cache dir
protected string $cacheDir
리턴 string

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

Get default font
protected string $font
리턴 string

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

Determine score points position
protected array $position
리턴 array

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

Get app root dir
protected string $rootDir
리턴 string

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

Get badge type
protected array $type
리턴 array