PHP 클래스 ImageSearch

파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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