PHP Трейт Neos\Media\Domain\Model\DimensionsTrait

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$height integer
$width integer

Открытые методы

Метод Описание
getAspectRatio ( boolean $respectOrientation = false ) : float Edge / aspect ratio of the image
getHeight ( ) : integer Height of the image in pixels
getOrientation ( ) : string Orientation of this image, i.e. portrait, landscape or square
getWidth ( ) : integer Width of the image in pixels
hasDimensions ( ) : boolean Does the asset have dimensions
isOrientationLandscape ( ) : boolean Whether this image is in landscape orientation
isOrientationPortrait ( ) : boolean Whether this image is in portrait orientation
isOrientationSquare ( ) : boolean Whether this image is square aspect ratio and therefore has a square orientation

Описание методов

getAspectRatio() публичный метод

Edge / aspect ratio of the image
public getAspectRatio ( boolean $respectOrientation = false ) : float
$respectOrientation boolean If false (the default), orientation is disregarded and always a value >= 1 is returned (like usual in "4 / 3" or "16 / 9")
Результат float

getHeight() публичный метод

Height of the image in pixels
public getHeight ( ) : integer
Результат integer

getOrientation() публичный метод

Orientation of this image, i.e. portrait, landscape or square
public getOrientation ( ) : string
Результат string One of this interface's ORIENTATION_* constants.

getWidth() публичный метод

Width of the image in pixels
public getWidth ( ) : integer
Результат integer

hasDimensions() публичный метод

Does the asset have dimensions
public hasDimensions ( ) : boolean
Результат boolean

isOrientationLandscape() публичный метод

Whether this image is in landscape orientation
public isOrientationLandscape ( ) : boolean
Результат boolean

isOrientationPortrait() публичный метод

Whether this image is in portrait orientation
public isOrientationPortrait ( ) : boolean
Результат boolean

isOrientationSquare() публичный метод

Whether this image is square aspect ratio and therefore has a square orientation
public isOrientationSquare ( ) : boolean
Результат boolean

Описание свойств

$height защищенное свойство

protected int $height
Результат integer

$width защищенное свойство

protected int $width
Результат integer