class ServiceCollection (View source)

Properties

protected $adWordsServices Adwords service
protected Collection $items List of items
protected string $preGetterMethod Google pre getter Method label i.e. getId,getName,etc.
protected string $preSetterMethod Google pre setter Method label i.e. setId,setName,etc.

Methods

__construct($adWordsServices, array $items = [])

ServiceCollection constructor.

where($field, $value, bool $opposite = false)

search the value in the collection in a specific field.

set($field, $value)

Set the value in the specific field.

map($callback)

No description

filter($callback)

No description

false|mixed
save()

Persist values in google.

Collection
items()

Get item list.

mixed
__call($name, $arguments)

If any method call is available in Collection class it will be fired for the items since it's a Collection instance.

Details

__construct($adWordsServices, array $items = [])

ServiceCollection constructor.

Parameters

$adWordsServices
array $items

ServiceCollection where($field, $value, bool $opposite = false)

search the value in the collection in a specific field.

Parameters

$field
$value
bool $opposite

Return Value

ServiceCollection

ServiceCollection set($field, $value)

Set the value in the specific field.

Parameters

$field
$value

Return Value

ServiceCollection

ServiceCollection map($callback)

Parameters

$callback

Return Value

ServiceCollection

ServiceCollection filter($callback)

Parameters

$callback

Return Value

ServiceCollection

false|mixed save()

Persist values in google.

Return Value

false|mixed

Collection items()

Get item list.

Return Value

Collection

mixed __call($name, $arguments)

If any method call is available in Collection class it will be fired for the items since it's a Collection instance.

Parameters

$name
$arguments

Return Value

mixed