Overview

Namespaces

  • Crunchmail
    • Collections
    • Entities
    • Exception
    • PHPUnit
    • Resources

Classes

  • GenericCollection
  • Overview
  • Namespace
  • Class

Class GenericCollection

Generic collection for Crunchmail API

Crunchmail\Collections\GenericCollection implements countable
Namespace: Crunchmail\Collections
Located at Collections/GenericCollection.php
Methods summary
public object
# __construct( Crunchmail\Resources\GenericResource $resource, array $data )

Initilialize the collection by populating the collection as an array of entities

Initilialize the collection by populating the collection as an array of entities

Parameters

$resource
parent resource
$data
$config API configuration

Returns

object
public GuzzleHttp\Psr7\Response
# getResponse( )

Returns the raw response

Returns the raw response

Returns

GuzzleHttp\Psr7\Response
public integer
# count( )

Return the number of results

Return the number of results

Returns

integer
public integer
# pageCount( )

Return the number of pages

Return the number of pages

Returns

integer
public array
# current( )

Return the current set of results

Return the current set of results

Returns

array
public Crunchmail\Collections\GenericCollection
# next( )

Repopulate collection with next results

Repopulate collection with next results

Returns

Crunchmail\Collections\GenericCollection
public Crunchmail\Collections\GenericCollection
# previous( )

Repopulate current collection with previous results

Repopulate current collection with previous results

Returns

Crunchmail\Collections\GenericCollection
public Crunchmail\Collections\GenericCollection
# getAdjacent( string $direction )

Return next or previous page

Return next or previous page

Parameters

$direction
next or previous

Returns

Crunchmail\Collections\GenericCollection
public Crunchmail\Collections\GenericCollection
# refresh( )

Repopulate current collection with fresh data

Repopulate current collection with fresh data

Returns

Crunchmail\Collections\GenericCollection
API documentation generated by ApiGen