PHP Класс ImageSearch

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$m_imageData
$m_imageOffset
$m_isSearch
$m_itemsPerPage
$m_numImagesFound
$m_orderBy
$m_orderDirection
$m_orderQuery
$m_searchString
$m_whereGroups
$m_whereQuery

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

Метод Описание
ImageSearch ( string $p_searchString, string $p_orderBy, string $p_orderDirection = 'ASC', integer $p_offset, integer $p_itemsPerPage ) This class can search for images matching specific criteria.
getImages ( ) : array Return the images that were found.
getImagesPerPage ( ) : integer The current value for the number of images shown per page.
getNumImagesFound ( ) : integer Return the total number of images that match the search.
run ( ) : array Execute the search and return the results.
setFilter ( $col, $val, $out = false ) constructor
setImagesPerPage ( integer $p_value ) : void Set the max number of images to return from the run() function.

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

ImageSearch() публичный Метод

Give the search criteria in the contructor, then call the run() function to execute the search and get an array of the images found.
public ImageSearch ( string $p_searchString, string $p_orderBy, string $p_orderDirection = 'ASC', integer $p_offset, integer $p_itemsPerPage )
$p_searchString string The string to search for.
$p_orderBy string Which column to order the results by. Can be one of ["description"|"photographer"|"place"|"date"| "inuse"|"id"|"time_create"|"last_modified"]
$p_orderDirection string Order by increasing or decreasing values. Can be ["ASC"|"DESC"]
$p_offset integer Return results starting from the given offset.
$p_itemsPerPage integer The number of results to return.

getImages() публичный Метод

Return the images that were found.
public getImages ( ) : array
Результат array

getImagesPerPage() публичный Метод

The current value for the number of images shown per page.
public getImagesPerPage ( ) : integer
Результат integer

getNumImagesFound() публичный Метод

Note that this may be different than the total number of images returned by run() or getImages() because that array is limited to the set "images per page". The number returned by this function is the total number of images without that restriction.
public getNumImagesFound ( ) : integer
Результат integer

run() публичный Метод

Execute the search and return the results.
public run ( ) : array
Результат array An array of Image objects.

setFilter() публичный Метод

constructor
public setFilter ( $col, $val, $out = false )

setImagesPerPage() публичный Метод

Set the max number of images to return from the run() function.
public setImagesPerPage ( integer $p_value ) : void
$p_value integer
Результат void

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

$m_imageData публичное свойство

public $m_imageData

$m_imageOffset публичное свойство

public $m_imageOffset

$m_isSearch публичное свойство

public $m_isSearch

$m_itemsPerPage публичное свойство

public $m_itemsPerPage

$m_numImagesFound публичное свойство

public $m_numImagesFound

$m_orderBy публичное свойство

public $m_orderBy

$m_orderDirection публичное свойство

public $m_orderDirection

$m_orderQuery публичное свойство

public $m_orderQuery

$m_searchString публичное свойство

public $m_searchString

$m_whereGroups публичное свойство

public $m_whereGroups

$m_whereQuery публичное свойство

public $m_whereQuery