BMLT PHP Query Client

MeetingQueryBuilder

Fluent query builder for BMLT meeting searches.

Provides a chainable interface for building complex meeting search queries. All methods return $this for method chaining, allowing you to build sophisticated queries in a readable, fluent style.

Tags
author

Patrick Joyce

since
1.0.0
example
$meetings = (new MeetingQueryBuilder($client))
    ->virtualOnly()
    ->startingAfter(17, 0)  // After 5 PM
    ->endingBefore(21, 0)   // Before 9 PM
    ->onWeekdays(Weekday::MONDAY, Weekday::FRIDAY)
    ->paginate(10)
    ->execute();

Table of Contents

Properties

$client  : BmltClient
$params  : array<string|int, mixed>

Methods

__construct()  : mixed
endingAfter()  : self
Filter meetings ending after specified time
endingBefore()  : self
Filter meetings ending before specified time
execute()  : array<string|int, Meeting>
Execute the query and return meetings.
executeNearAddress()  : array<string|int, mixed>
Execute query near an address (uses geocoding)
executeNearAddressKm()  : array<string|int, mixed>
Execute query near an address in kilometers
getParams()  : array<string|int, mixed>
Get the current parameters (useful for debugging)
hybridOnly()  : self
Filter to hybrid meetings only
inLanguage()  : self
Filter by language
inPersonOnly()  : self
Filter to in-person meetings only
inServiceBody()  : self
Filter by service body ID
nearCoordinates()  : self
Filter by geographic coordinates and radius
nearCoordinatesKm()  : self
Filter by geographic coordinates and radius in kilometers
onWeekdays()  : self
Filter meetings by specific weekdays.
paginate()  : self
Set page size for results
reset()  : self
Reset all parameters
searchText()  : self
Search for text in meeting data
sortBy()  : self
Sort results by specified key
sortByDistance()  : self
Sort results by distance (requires coordinates)
startingAfter()  : self
Filter meetings starting after specified time
startingBefore()  : self
Filter meetings starting before specified time
virtualOnly()  : self
Filter to virtual meetings only
withFormat()  : self
Filter by format shared ID
withFormats()  : self
Filter by multiple format shared IDs
withParam()  : self
Add custom parameter
withVenueType()  : self
Filter by venue type

Properties

Methods

endingAfter()

Filter meetings ending after specified time

public endingAfter(int $hour[, int $minute = 0 ]) : self
Parameters
$hour : int
$minute : int = 0
Return values
self

endingBefore()

Filter meetings ending before specified time

public endingBefore(int $hour[, int $minute = 0 ]) : self
Parameters
$hour : int
$minute : int = 0
Return values
self

execute()

Execute the query and return meetings.

public execute() : array<string|int, Meeting>

Runs the constructed query against the BMLT server and returns an array of Meeting objects matching the specified criteria.

Tags
throws
BmltQueryException

If the request fails or returns invalid data

example
$meetings = $builder->virtualOnly()->startingAfter(18, 0)->execute();
Return values
array<string|int, Meeting>

Array of Meeting objects matching the query criteria

executeNearAddress()

Execute query near an address (uses geocoding)

public executeNearAddress(string $address, float $radiusMiles[, bool $sortByDistance = true ]) : array<string|int, mixed>
Parameters
$address : string
$radiusMiles : float
$sortByDistance : bool = true
Return values
array<string|int, mixed>

executeNearAddressKm()

Execute query near an address in kilometers

public executeNearAddressKm(string $address, float $radiusKm[, bool $sortByDistance = true ]) : array<string|int, mixed>
Parameters
$address : string
$radiusKm : float
$sortByDistance : bool = true
Return values
array<string|int, mixed>

getParams()

Get the current parameters (useful for debugging)

public getParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

hybridOnly()

Filter to hybrid meetings only

public hybridOnly() : self
Return values
self

inPersonOnly()

Filter to in-person meetings only

public inPersonOnly() : self
Return values
self

inServiceBody()

Filter by service body ID

public inServiceBody(int $serviceBodyId) : self
Parameters
$serviceBodyId : int
Return values
self

nearCoordinates()

Filter by geographic coordinates and radius

public nearCoordinates(Coordinates $coordinates, float $radiusMiles) : self
Parameters
$coordinates : Coordinates
$radiusMiles : float
Return values
self

nearCoordinatesKm()

Filter by geographic coordinates and radius in kilometers

public nearCoordinatesKm(Coordinates $coordinates, float $radiusKm) : self
Parameters
$coordinates : Coordinates
$radiusKm : float
Return values
self

onWeekdays()

Filter meetings by specific weekdays.

public onWeekdays(Weekday|int ...$weekdays) : self
Parameters
$weekdays : Weekday|int

One or more weekdays (1=Sunday, 7=Saturday)

Tags
example
// Filter for Monday and Friday
$builder->onWeekdays(Weekday::MONDAY, Weekday::FRIDAY);

// Or use integers
$builder->onWeekdays(2, 6); // Monday, Friday
Return values
self

Returns $this for method chaining

paginate()

Set page size for results

public paginate(int $pageSize[, int $pageNum = 1 ]) : self
Parameters
$pageSize : int
$pageNum : int = 1
Return values
self

searchText()

Search for text in meeting data

public searchText(string $text) : self
Parameters
$text : string
Return values
self

sortByDistance()

Sort results by distance (requires coordinates)

public sortByDistance([bool $sort = true ]) : self
Parameters
$sort : bool = true
Return values
self

startingAfter()

Filter meetings starting after specified time

public startingAfter(int $hour[, int $minute = 0 ]) : self
Parameters
$hour : int
$minute : int = 0
Return values
self

startingBefore()

Filter meetings starting before specified time

public startingBefore(int $hour[, int $minute = 0 ]) : self
Parameters
$hour : int
$minute : int = 0
Return values
self

virtualOnly()

Filter to virtual meetings only

public virtualOnly() : self
Return values
self

withFormat()

Filter by format shared ID

public withFormat(int $formatId) : self
Parameters
$formatId : int
Return values
self

withFormats()

Filter by multiple format shared IDs

public withFormats(int ...$formatIds) : self
Parameters
$formatIds : int
Return values
self

withParam()

Add custom parameter

public withParam(string $key, mixed $value) : self
Parameters
$key : string
$value : mixed
Return values
self

        
On this page

Search results