\Google\Photos\Library\V1FiltersBuilder

Provides an easier interface for constructing {@link Filters} objects.

Usage: $filters = FiltersBuilder::new() ->addIncludedContentCategory(ContentCategory::LANDSCAPES) ->setIncludeArchivedMedia(true) ->build(); $searchMediaItemsRequest->setFilters($filters);

Summary

Methods
Properties
Constants
construct()
build()
setMediaTypeFromString()
setMediaType()
addIncludedCategory()
addIncludedCategoryFromString()
addIncludedFeature()
addIncludedFeatureFromString()
addExcludedCategory()
addExcludedCategoryFromString()
addDateRange()
addDateRangeFromDateTime()
addDate()
addDateFromDateTime()
setIncludeArchivedMedia()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
convertToGoogleDate()
$mediaType
$includedCategories
$includedFeatures
$excludedCategories
$ranges
$dates
$includeArchivedMedia
N/A

Properties

$mediaType

$mediaType : 

Type

$includedCategories

$includedCategories : 

Type

$includedFeatures

$includedFeatures : 

Type

$excludedCategories

$excludedCategories : 

Type

$ranges

$ranges : 

Type

$dates

$dates : 

Type

$includeArchivedMedia

$includeArchivedMedia : 

Type

Methods

construct()

construct() 

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

build()

build() : \Google\Photos\Library\V1\Filters

Builds a Filters object.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\Google\Photos\Library\V1\Filters

The built Filters object.

setMediaTypeFromString()

setMediaTypeFromString(string  $mediaType) : $this

Sets the media type, from a string. Overwrites the existing media type.

Parameters

string $mediaType

The media type to set. Must be an element of {@link PhotosLibraryClient::mediaTypes()}

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

setMediaType()

setMediaType(integer  $mediaType) : $this

Sets the media type. Overwrites the existing media type.

Parameters

integer $mediaType

The media type to set, a constant from MediaType.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addIncludedCategory()

addIncludedCategory(integer  $category) : $this

Adds a category to the list of included categories.

Parameters

integer $category

The category to include; a constant from {@link ContentCategory}.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addIncludedCategoryFromString()

addIncludedCategoryFromString(string  $category) : $this

Adds a category to the list of included categories.

Parameters

string $category

The category to include. Must be an element of {@link PhotosLibraryClient::contentCategories()}

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addIncludedFeature()

addIncludedFeature(integer  $feature) : $this

Adds a feature to the list of included features.

Parameters

integer $feature

The feature to include; a constant from {@link Feature}.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addIncludedFeatureFromString()

addIncludedFeatureFromString(string  $feature) : $this

Adds a category to the list of included features.

Parameters

string $feature

The feature to include. Must be an element of {@link PhotosLibraryClient::features()}

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addExcludedCategory()

addExcludedCategory(integer  $category) : $this

Adds a category to the list of of excluded categories.

Parameters

integer $category

The category to exclude.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addExcludedCategoryFromString()

addExcludedCategoryFromString(string  $category) : $this

Adds a category to the list of excluded categories.

Parameters

string $category

The category to exclude. Must be an element of {@link PhotosLibraryClient::contentCategories()}

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addDateRange()

addDateRange(\Google\Type\Date  $start, \Google\Type\Date  $end) : $this

Adds a date range to the list of included date ranges.

Parameters

\Google\Type\Date $start
\Google\Type\Date $end
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addDateRangeFromDateTime()

addDateRangeFromDateTime(\DateTime  $start, \DateTime  $end) : $this

Adds a date range to the list of included date ranges, from two DateTimes.

If you require dates with wildcards (e.g., a year-only date), you must use \Google\Photos\Library\V1\addDateRange.

Parameters

\DateTime $start
\DateTime $end
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addDate()

addDate(\Google\Type\Date  $date) : $this

Adds a date to the list of included dates.

Parameters

\Google\Type\Date $date
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

addDateFromDateTime()

addDateFromDateTime(\DateTime  $date) : $this

Adds a date to the list of included dates, from a DateTime.

If you require a date with wildcards (e.g., a year-only date), you must use \Google\Photos\Library\V1\addDate.

Parameters

\DateTime $date
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

setIncludeArchivedMedia()

setIncludeArchivedMedia(boolean  $includeArchivedMedia) : $this

Sets the flag to include archived media. If false, archived media will not be returned.

Parameters

boolean $includeArchivedMedia
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

$this

convertToGoogleDate()

convertToGoogleDate(\DateTime  $date) : \Google\Type\Date

Converts a DateTime object into a Google Date object.

Parameters

\DateTime $date
Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///Users/jfschmakeit/Downloads/phpDocumentor.phar/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\Google\Type\Date