PHP 클래스 MediaModel, addons

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

공개 메소드들

메소드 설명
__construct ( ) MediaModel constructor.
delete ( array $Media = [], array | boolean $Options = [] )
deleteParent ( $ParentTable, $ParentID )
getID ( integer $MediaID, boolean $DatasetType = false, array $Options = [] ) : array | false Get a media row by ID.
getImageSize ( string $Path ) : array If passed path leads to an image, return size
pathUploads ( ) : string Return path to upload folder.
preloadDiscussionMedia ( $DiscussionID, $CommentIDList ) : Gdn_DataSet
reassign ( integer $ForeignID, string $ForeignTable, $NewForeignID, $NewForeignTable ) : object Retrieve all media for a foreign record.
thumbnailHeight ( ) : boolean | mixed
thumbnailUrl ( &$Media ) : mixed | string
thumbnailWidth ( ) : boolean | mixed
url ( $Media ) : mixed | string

메소드 상세

__construct() 공개 메소드

MediaModel constructor.
public __construct ( )

delete() 공개 메소드

public delete ( array $Media = [], array | boolean $Options = [] )
$Media array The media row.
$Options array | boolean Either a boolean that says whether or not to delete the file or an array with a

deleteParent() 공개 메소드

public deleteParent ( $ParentTable, $ParentID )
$ParentTable
$ParentID

getID() 공개 메소드

Get a media row by ID.
public getID ( integer $MediaID, boolean $DatasetType = false, array $Options = [] ) : array | false
$MediaID integer The ID of the media entry.
$DatasetType boolean Not used.
$Options array Not used.
리턴 array | false Returns the media row or **false** if it isn't found.

getImageSize() 공개 정적인 메소드

If passed path leads to an image, return size
public static getImageSize ( string $Path ) : array
$Path string Path to file.
리턴 array [0] => Height, [1] => Width.

pathUploads() 공개 정적인 메소드

Return path to upload folder.
public static pathUploads ( ) : string
리턴 string Path to upload folder.

preloadDiscussionMedia() 공개 메소드

public preloadDiscussionMedia ( $DiscussionID, $CommentIDList ) : Gdn_DataSet
$DiscussionID
$CommentIDList
리턴 Gdn_DataSet

reassign() 공개 메소드

Retrieve all media for a foreign record.
public reassign ( integer $ForeignID, string $ForeignTable, $NewForeignID, $NewForeignTable ) : object
$ForeignID integer
$ForeignTable string Lowercase.
리턴 object SQL results.

thumbnailHeight() 공개 정적인 메소드

public static thumbnailHeight ( ) : boolean | mixed
리턴 boolean | mixed

thumbnailUrl() 공개 정적인 메소드

public static thumbnailUrl ( &$Media ) : mixed | string
$Media
리턴 mixed | string

thumbnailWidth() 공개 정적인 메소드

public static thumbnailWidth ( ) : boolean | mixed
리턴 boolean | mixed

url() 공개 정적인 메소드

public static url ( $Media ) : mixed | string
$Media
리턴 mixed | string