PHP 클래스 Common\Core\Model

상속: extends BaseModel
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$modules array Cached modules

공개 메소드들

메소드 설명
addNumber ( string $string ) : string Add a number to the string
generatePassword ( integer $length = 6, boolean $uppercaseAllowed = true, boolean $lowercaseAllowed = true ) : string Generate a totally random but readable/speakable password
generateThumbnails ( string $path, string $sourceFile ) Generate thumbnails based on the folders in the path Use - 128x128 as foldername to generate an image where the width will be 128px and the height will be 128px - 128x as foldername to generate an image where the width will be 128px, the height will be calculated based on the aspect ratio.
getModules ( ) : array Get the modules
getThumbnailFolders ( string $path, boolean $includeSource = false ) : array Get the thumbnail folders
getUTCDate ( string $format = null, integer $timestamp = null ) : string Get the UTC date in a specific format. Use this method when inserting dates in the database!
getUTCTimestamp ( SpoonFormDate $date, SpoonFormTime $time = null ) : integer Get the UTC timestamp for a date/time object combination.
startProcessingHooks ( ) Start processing the hooks
subscribeToEvent ( string $eventModule, string $eventName, string $module, mixed $callback ) Subscribe to an event, when the subscription already exists, the callback will be updated.
triggerEvent ( string $module, string $eventName, mixed $data = null ) Trigger an event
unsubscribeFromEvent ( string $eventModule, string $eventName, string $module ) Unsubscribe from an event

메소드 상세

addNumber() 공개 정적인 메소드

Add a number to the string
public static addNumber ( string $string ) : string
$string string The string where the number will be appended to.
리턴 string

generatePassword() 공개 정적인 메소드

Generate a totally random but readable/speakable password
public static generatePassword ( integer $length = 6, boolean $uppercaseAllowed = true, boolean $lowercaseAllowed = true ) : string
$length integer The maximum length for the password to generate.
$uppercaseAllowed boolean Are uppercase letters allowed?
$lowercaseAllowed boolean Are lowercase letters allowed?
리턴 string

generateThumbnails() 공개 정적인 메소드

- x128 as foldername to generate an image where the height will be 128px, the width will be calculated based on the aspect ratio.
public static generateThumbnails ( string $path, string $sourceFile )
$path string The path wherein the thumbnail-folders will be stored.
$sourceFile string The location of the source file.

getModules() 공개 정적인 메소드

Get the modules
public static getModules ( ) : array
리턴 array

getThumbnailFolders() 공개 정적인 메소드

Get the thumbnail folders
public static getThumbnailFolders ( string $path, boolean $includeSource = false ) : array
$path string The path
$includeSource boolean Should the source-folder be included in the return-array.
리턴 array

getUTCDate() 공개 정적인 메소드

Get the UTC date in a specific format. Use this method when inserting dates in the database!
public static getUTCDate ( string $format = null, integer $timestamp = null ) : string
$format string The format to return the timestamp in. Default is MySQL datetime format.
$timestamp integer The timestamp to use, if not provided the current time will be used.
리턴 string

getUTCTimestamp() 공개 정적인 메소드

Get the UTC timestamp for a date/time object combination.
public static getUTCTimestamp ( SpoonFormDate $date, SpoonFormTime $time = null ) : integer
$date SpoonFormDate An instance of \SpoonFormDate.
$time SpoonFormTime An instance of \SpoonFormTime.
리턴 integer

startProcessingHooks() 공개 정적인 메소드

Start processing the hooks
사용 중단: use the symfony event dispatcher instead
public static startProcessingHooks ( )

subscribeToEvent() 공개 정적인 메소드

Subscribe to an event, when the subscription already exists, the callback will be updated.
사용 중단: use the symfony event dispatcher instead
public static subscribeToEvent ( string $eventModule, string $eventName, string $module, mixed $callback )
$eventModule string The module that triggers the event.
$eventName string The name of the event.
$module string The module that subscribes to the event.
$callback mixed The callback that should be executed when the event is triggered.

triggerEvent() 공개 정적인 메소드

Trigger an event
사용 중단: use the symfony event dispatcher instead
public static triggerEvent ( string $module, string $eventName, mixed $data = null )
$module string The module that triggers the event.
$eventName string The name of the event.
$data mixed The data that should be send to subscribers.

unsubscribeFromEvent() 공개 정적인 메소드

Unsubscribe from an event
사용 중단: use the symfony event dispatcher instead
public static unsubscribeFromEvent ( string $eventModule, string $eventName, string $module )
$eventModule string The module that triggers the event.
$eventName string The name of the event.
$module string The module that subscribes to the event.

프로퍼티 상세

$modules 보호되어 있는 정적으로 프로퍼티

Cached modules
protected static array $modules
리턴 array