Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | List of all members
wikimedia Class Reference

Public Member Functions

 __construct ($url='')
 
 get_image_url ($titles)
 
 get_images_by_page ($title)
 
object get_thumb_url ($image_url, $orig_width, $orig_height, $thumb_width=75, $force=false)
 Generate thumbnail URL from image URL. More...
 
 login ($user, $pass)
 
 logout ()
 
 search_images ($keyword, $page=0, $params=array())
 Search for images and return photos array. More...
 

Member Function Documentation

◆ get_thumb_url()

object wikimedia::get_thumb_url (   $image_url,
  $orig_width,
  $orig_height,
  $thumb_width = 75,
  $force = false 
)

Generate thumbnail URL from image URL.

Parameters
string$image_url
int$orig_width
int$orig_height
int$thumb_width
bool$forceWhen true, forces the generation of a thumb URL. OUTPUT
Return values
string

◆ search_images()

wikimedia::search_images (   $keyword,
  $page = 0,
  $params = array() 
)

Search for images and return photos array.

Parameters
string$keyword
int$page
array$paramsadditional query params
Return values
array

The documentation for this class was generated from the following file: