Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
Subscription Class Reference

Public Member Functions

 setSubscription (array $data)
 Save subscription to RDMBS.
 
 getSubscription ($key)
 Get subscription by ID/key.
 
 hasSubscription ($key)
 Determine if a subscription matching the key exists.
 
 deleteSubscription ($key)
 Delete a subscription.
 
 getNow ()
 Get a new DateTime or the one injected for testing.
 
 setNow (DateTime $now)
 Set a DateTime instance for assisting with unit testing.
 
- Public Member Functions inherited from AbstractModel
 __construct (TableGatewayInterface $tableGateway=null)
 Constructor.
 

Protected Attributes

 $now
 
- Protected Attributes inherited from AbstractModel
 $db = null
 

Member Function Documentation

deleteSubscription (   $key)

Delete a subscription.

Parameters
string$key
Returns
bool

Implements SubscriptionPersistenceInterface.

getNow ( )

Get a new DateTime or the one injected for testing.

Returns
DateTime
getSubscription (   $key)

Get subscription by ID/key.

Parameters
string$key
Returns
array
Exceptions
PubSubHubbub\Exception\InvalidArgumentException

Implements SubscriptionPersistenceInterface.

hasSubscription (   $key)

Determine if a subscription matching the key exists.

Parameters
string$key
Returns
bool
Exceptions
PubSubHubbub\Exception\InvalidArgumentException

Implements SubscriptionPersistenceInterface.

setNow ( DateTime  $now)

Set a DateTime instance for assisting with unit testing.

Parameters
DateTime$now
Returns
Subscription
setSubscription ( array  $data)

Save subscription to RDMBS.

Parameters
array$data
Returns
bool
Exceptions
PubSubHubbub\Exception\InvalidArgumentException

Implements SubscriptionPersistenceInterface.

Member Data Documentation

$now
protected