Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 1277 lines (30 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 18 classes

Google_Service_Customsearch:: (1 method):
  __construct()

Google_Service_Customsearch_Cse_Resource:: (1 method):
  listCse()

Google_Service_Customsearch_Context:: (4 methods):
  setFacets()
  getFacets()
  setTitle()
  getTitle()

Google_Service_Customsearch_ContextFacets:: (6 methods):
  setAnchor()
  getAnchor()
  setLabel()
  getLabel()
  setLabelWithOp()
  getLabelWithOp()

Google_Service_Customsearch_Promotion:: (12 methods):
  setBodyLines()
  getBodyLines()
  setDisplayLink()
  getDisplayLink()
  setHtmlTitle()
  getHtmlTitle()
  setImage()
  getImage()
  setLink()
  getLink()
  setTitle()
  getTitle()

Google_Service_Customsearch_PromotionBodyLines:: (8 methods):
  setHtmlTitle()
  getHtmlTitle()
  setLink()
  getLink()
  setTitle()
  getTitle()
  setUrl()
  getUrl()

Google_Service_Customsearch_PromotionImage:: (6 methods):
  setHeight()
  getHeight()
  setSource()
  getSource()
  setWidth()
  getWidth()

Google_Service_Customsearch_Query:: (74 methods):
  setCount()
  getCount()
  setCr()
  getCr()
  setCref()
  getCref()
  setCx()
  getCx()
  setDateRestrict()
  getDateRestrict()
  setDisableCnTwTranslation()
  getDisableCnTwTranslation()
  setExactTerms()
  getExactTerms()
  setExcludeTerms()
  getExcludeTerms()
  setFileType()
  getFileType()
  setFilter()
  getFilter()
  setGl()
  getGl()
  setGoogleHost()
  getGoogleHost()
  setHighRange()
  getHighRange()
  setHl()
  getHl()
  setHq()
  getHq()
  setImgColorType()
  getImgColorType()
  setImgDominantColor()
  getImgDominantColor()
  setImgSize()
  getImgSize()
  setImgType()
  getImgType()
  setInputEncoding()
  getInputEncoding()
  setLanguage()
  getLanguage()
  setLinkSite()
  getLinkSite()
  setLowRange()
  getLowRange()
  setOrTerms()
  getOrTerms()
  setOutputEncoding()
  getOutputEncoding()
  setRelatedSite()
  getRelatedSite()
  setRights()
  getRights()
  setSafe()
  getSafe()
  setSearchTerms()
  getSearchTerms()
  setSearchType()
  getSearchType()
  setSiteSearch()
  getSiteSearch()
  setSiteSearchFilter()
  getSiteSearchFilter()
  setSort()
  getSort()
  setStartIndex()
  getStartIndex()
  setStartPage()
  getStartPage()
  setTitle()
  getTitle()
  setTotalResults()
  getTotalResults()

Google_Service_Customsearch_Result:: (30 methods):
  setCacheId()
  getCacheId()
  setDisplayLink()
  getDisplayLink()
  setFileFormat()
  getFileFormat()
  setFormattedUrl()
  getFormattedUrl()
  setHtmlFormattedUrl()
  getHtmlFormattedUrl()
  setHtmlSnippet()
  getHtmlSnippet()
  setHtmlTitle()
  getHtmlTitle()
  setImage()
  getImage()
  setKind()
  getKind()
  setLabels()
  getLabels()
  setLink()
  getLink()
  setMime()
  getMime()
  setPagemap()
  getPagemap()
  setSnippet()
  getSnippet()
  setTitle()
  getTitle()

Google_Service_Customsearch_ResultImage:: (14 methods):
  setByteSize()
  getByteSize()
  setContextLink()
  getContextLink()
  setHeight()
  getHeight()
  setThumbnailHeight()
  getThumbnailHeight()
  setThumbnailLink()
  getThumbnailLink()
  setThumbnailWidth()
  getThumbnailWidth()
  setWidth()
  getWidth()

Google_Service_Customsearch_ResultLabels:: (6 methods):
  setDisplayName()
  getDisplayName()
  setLabelWithOp()
  getLabelWithOp()
  setName()
  getName()

Google_Service_Customsearch_ResultPagemap:: (0 methods):

Google_Service_Customsearch_ResultPagemapItemElement:: (0 methods):

Google_Service_Customsearch_Search:: (16 methods):
  setContext()
  getContext()
  setItems()
  getItems()
  setKind()
  getKind()
  setPromotions()
  getPromotions()
  setQueries()
  getQueries()
  setSearchInformation()
  getSearchInformation()
  setSpelling()
  getSpelling()
  setUrl()
  getUrl()

Google_Service_Customsearch_SearchQueries:: (0 methods):

Google_Service_Customsearch_SearchSearchInformation:: (8 methods):
  setFormattedSearchTime()
  getFormattedSearchTime()
  setFormattedTotalResults()
  getFormattedTotalResults()
  setSearchTime()
  getSearchTime()
  setTotalResults()
  getTotalResults()

Google_Service_Customsearch_SearchSpelling:: (4 methods):
  setCorrectedQuery()
  getCorrectedQuery()
  setHtmlCorrectedQuery()
  getHtmlCorrectedQuery()

Google_Service_Customsearch_SearchUrl:: (4 methods):
  setTemplate()
  getTemplate()
  setType()
  getType()


Class: Google_Service_Customsearch  - X-Ref

Service definition for Customsearch (v1).

<p>
Lets you search over a website or collection of websites</p>

<p>
For more information about this service, see the API
<a href="https://developers.google.com/custom-search/v1/using_rest" target="_blank">Documentation</a>
</p>

__construct(Google_Client $client)   X-Ref
Constructs the internal representation of the Customsearch service.

param: Google_Client $client

Class: Google_Service_Customsearch_Cse_Resource  - X-Ref

The "cse" collection of methods.
Typical usage is:
<code>
$customsearchService = new Google_Service_Customsearch(...);
$cse = $customsearchService->cse;
</code>

listCse($q, $optParams = array()   X-Ref
Returns metadata about the search performed, metadata about the custom search
engine used for the search, and the search results. (cse.listCse)

param: string $q Query
param: array $optParams Optional parameters.
return: Google_Service_Customsearch_Search

Class: Google_Service_Customsearch_Context  - X-Ref

setFacets($facets)   X-Ref
No description

getFacets()   X-Ref
No description

setTitle($title)   X-Ref
No description

getTitle()   X-Ref
No description

Class: Google_Service_Customsearch_ContextFacets  - X-Ref

setAnchor($anchor)   X-Ref
No description

getAnchor()   X-Ref
No description

setLabel($label)   X-Ref
No description

getLabel()   X-Ref
No description

setLabelWithOp($labelWithOp)   X-Ref
No description

getLabelWithOp()   X-Ref
No description

Class: Google_Service_Customsearch_Promotion  - X-Ref

setBodyLines($bodyLines)   X-Ref
No description

getBodyLines()   X-Ref
No description

setDisplayLink($displayLink)   X-Ref
No description

getDisplayLink()   X-Ref
No description

setHtmlTitle($htmlTitle)   X-Ref
No description

getHtmlTitle()   X-Ref
No description

setImage(Google_Service_Customsearch_PromotionImage $image)   X-Ref
No description

getImage()   X-Ref
No description

setLink($link)   X-Ref
No description

getLink()   X-Ref
No description

setTitle($title)   X-Ref
No description

getTitle()   X-Ref
No description

Class: Google_Service_Customsearch_PromotionBodyLines  - X-Ref

setHtmlTitle($htmlTitle)   X-Ref
No description

getHtmlTitle()   X-Ref
No description

setLink($link)   X-Ref
No description

getLink()   X-Ref
No description

setTitle($title)   X-Ref
No description

getTitle()   X-Ref
No description

setUrl($url)   X-Ref
No description

getUrl()   X-Ref
No description

Class: Google_Service_Customsearch_PromotionImage  - X-Ref

setHeight($height)   X-Ref
No description

getHeight()   X-Ref
No description

setSource($source)   X-Ref
No description

getSource()   X-Ref
No description

setWidth($width)   X-Ref
No description

getWidth()   X-Ref
No description

Class: Google_Service_Customsearch_Query  - X-Ref

setCount($count)   X-Ref
No description

getCount()   X-Ref
No description

setCr($cr)   X-Ref
No description

getCr()   X-Ref
No description

setCref($cref)   X-Ref
No description

getCref()   X-Ref
No description

setCx($cx)   X-Ref
No description

getCx()   X-Ref
No description

setDateRestrict($dateRestrict)   X-Ref
No description

getDateRestrict()   X-Ref
No description

setDisableCnTwTranslation($disableCnTwTranslation)   X-Ref
No description

getDisableCnTwTranslation()   X-Ref
No description

setExactTerms($exactTerms)   X-Ref
No description

getExactTerms()   X-Ref
No description

setExcludeTerms($excludeTerms)   X-Ref
No description

getExcludeTerms()   X-Ref
No description

setFileType($fileType)   X-Ref
No description

getFileType()   X-Ref
No description

setFilter($filter)   X-Ref
No description

getFilter()   X-Ref
No description

setGl($gl)   X-Ref
No description

getGl()   X-Ref
No description

setGoogleHost($googleHost)   X-Ref
No description

getGoogleHost()   X-Ref
No description

setHighRange($highRange)   X-Ref
No description

getHighRange()   X-Ref
No description

setHl($hl)   X-Ref
No description

getHl()   X-Ref
No description

setHq($hq)   X-Ref
No description

getHq()   X-Ref
No description

setImgColorType($imgColorType)   X-Ref
No description

getImgColorType()   X-Ref
No description

setImgDominantColor($imgDominantColor)   X-Ref
No description

getImgDominantColor()   X-Ref
No description

setImgSize($imgSize)   X-Ref
No description

getImgSize()   X-Ref
No description

setImgType($imgType)   X-Ref
No description

getImgType()   X-Ref
No description

setInputEncoding($inputEncoding)   X-Ref
No description

getInputEncoding()   X-Ref
No description

setLanguage($language)   X-Ref
No description

getLanguage()   X-Ref
No description

setLinkSite($linkSite)   X-Ref
No description

getLinkSite()   X-Ref
No description

setLowRange($lowRange)   X-Ref
No description

getLowRange()   X-Ref
No description

setOrTerms($orTerms)   X-Ref
No description

getOrTerms()   X-Ref
No description

setOutputEncoding($outputEncoding)   X-Ref
No description

getOutputEncoding()   X-Ref
No description

setRelatedSite($relatedSite)   X-Ref
No description

getRelatedSite()   X-Ref
No description

setRights($rights)   X-Ref
No description

getRights()   X-Ref
No description

setSafe($safe)   X-Ref
No description

getSafe()   X-Ref
No description

setSearchTerms($searchTerms)   X-Ref
No description

getSearchTerms()   X-Ref
No description

setSearchType($searchType)   X-Ref
No description

getSearchType()   X-Ref
No description

setSiteSearch($siteSearch)   X-Ref
No description

getSiteSearch()   X-Ref
No description

setSiteSearchFilter($siteSearchFilter)   X-Ref
No description

getSiteSearchFilter()   X-Ref
No description

setSort($sort)   X-Ref
No description

getSort()   X-Ref
No description

setStartIndex($startIndex)   X-Ref
No description

getStartIndex()   X-Ref
No description

setStartPage($startPage)   X-Ref
No description

getStartPage()   X-Ref
No description

setTitle($title)   X-Ref
No description

getTitle()   X-Ref
No description

setTotalResults($totalResults)   X-Ref
No description

getTotalResults()   X-Ref
No description

Class: Google_Service_Customsearch_Result  - X-Ref

setCacheId($cacheId)   X-Ref
No description

getCacheId()   X-Ref
No description

setDisplayLink($displayLink)   X-Ref
No description

getDisplayLink()   X-Ref
No description

setFileFormat($fileFormat)   X-Ref
No description

getFileFormat()   X-Ref
No description

setFormattedUrl($formattedUrl)   X-Ref
No description

getFormattedUrl()   X-Ref
No description

setHtmlFormattedUrl($htmlFormattedUrl)   X-Ref
No description

getHtmlFormattedUrl()   X-Ref
No description

setHtmlSnippet($htmlSnippet)   X-Ref
No description

getHtmlSnippet()   X-Ref
No description

setHtmlTitle($htmlTitle)   X-Ref
No description

getHtmlTitle()   X-Ref
No description

setImage(Google_Service_Customsearch_ResultImage $image)   X-Ref
No description

getImage()   X-Ref
No description

setKind($kind)   X-Ref
No description

getKind()   X-Ref
No description

setLabels($labels)   X-Ref
No description

getLabels()   X-Ref
No description

setLink($link)   X-Ref
No description

getLink()   X-Ref
No description

setMime($mime)   X-Ref
No description

getMime()   X-Ref
No description

setPagemap($pagemap)   X-Ref
No description

getPagemap()   X-Ref
No description

setSnippet($snippet)   X-Ref
No description

getSnippet()   X-Ref
No description

setTitle($title)   X-Ref
No description

getTitle()   X-Ref
No description

Class: Google_Service_Customsearch_ResultImage  - X-Ref

setByteSize($byteSize)   X-Ref
No description

getByteSize()   X-Ref
No description

setContextLink($contextLink)   X-Ref
No description

getContextLink()   X-Ref
No description

setHeight($height)   X-Ref
No description

getHeight()   X-Ref
No description

setThumbnailHeight($thumbnailHeight)   X-Ref
No description

getThumbnailHeight()   X-Ref
No description

setThumbnailLink($thumbnailLink)   X-Ref
No description

getThumbnailLink()   X-Ref
No description

setThumbnailWidth($thumbnailWidth)   X-Ref
No description

getThumbnailWidth()   X-Ref
No description

setWidth($width)   X-Ref
No description

getWidth()   X-Ref
No description

Class: Google_Service_Customsearch_ResultLabels  - X-Ref

setDisplayName($displayName)   X-Ref
No description

getDisplayName()   X-Ref
No description

setLabelWithOp($labelWithOp)   X-Ref
No description

getLabelWithOp()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description

Class: Google_Service_Customsearch_Search  - X-Ref

setContext(Google_Service_Customsearch_Context $context)   X-Ref
No description

getContext()   X-Ref
No description

setItems($items)   X-Ref
No description

getItems()   X-Ref
No description

setKind($kind)   X-Ref
No description

getKind()   X-Ref
No description

setPromotions($promotions)   X-Ref
No description

getPromotions()   X-Ref
No description

setQueries($queries)   X-Ref
No description

getQueries()   X-Ref
No description

setSearchInformation(Google_Service_Customsearch_SearchSearchInformation $searchInformation)   X-Ref
No description

getSearchInformation()   X-Ref
No description

setSpelling(Google_Service_Customsearch_SearchSpelling $spelling)   X-Ref
No description

getSpelling()   X-Ref
No description

setUrl(Google_Service_Customsearch_SearchUrl $url)   X-Ref
No description

getUrl()   X-Ref
No description

Class: Google_Service_Customsearch_SearchUrl  - X-Ref

setTemplate($template)   X-Ref
No description

getTemplate()   X-Ref
No description

setType($type)   X-Ref
No description

getType()   X-Ref
No description