Methods

create()

create() : mixed

Creates an empty object instance.

Returns

mixed

add()

add(mixed  $object) 

Add an object to the repository

Parameters

mixed $object

Throws

\Pivot\Core\Exception\InvalidArgumentException
\Pivot\Core\Exception\RepositoryException

remove()

remove(mixed  $object) 

Removes an object from the repository

Parameters

mixed $object

Throws

\Pivot\Core\Exception\InvalidArgumentException
\Pivot\Core\Exception\RepositoryException

find()

find(mixed  $id, integer  $lockMode = \Doctrine\DBAL\LockMode::NONE, integer|null  $lockVersion = null) : object|null

Finds an entity by its primary key / identifier.

Parameters

mixed $id

The identifier.

integer $lockMode

The lock mode.

integer|null $lockVersion

The lock version.

Returns

object|null —

The entity instance or NULL if the entity can not be found.

getClassName()

getClassName() : string

Returns

string

request()

request(mixed  $id) : object

Parameters

mixed $id

The identifier.

Throws

\Pivot\Core\Exception\NotFoundException

Returns

object

findAll()

findAll() : \Pivot\Core\Interfaces\Result

Returns

\Pivot\Core\Interfaces\Result

requestByUsername()

requestByUsername(string  $username) : \Pivot\Common\Repositories\Subscription

Parameters

string $username

Throws

\Pivot\Core\Exception\NotFoundException

Returns

\Pivot\Common\Repositories\Subscription

findByIdWithChildren()

findByIdWithChildren(  $subscription_id) 

Parameters

$subscription_id

findById()

findById(  $id,   $entity = true) 

Parameters

$id
$entity

fetchStateByDatabaseName()

fetchStateByDatabaseName(  $database) 

Parameters

$database

findByIdWithMinChildren()

findByIdWithMinChildren(  $subscription_id) 

Parameters

$subscription_id

findBySubdomainWithChildren()

findBySubdomainWithChildren(  $subdomain) 

Parameters

$subdomain

findBySubdomain()

findBySubdomain(  $subdomain,   $entity = true) 

Parameters

$subdomain
$entity

findByDatabaseWithChildren()

findByDatabaseWithChildren(  $database) 

Parameters

$database

findAllWithChildren()

findAllWithChildren() 

getEntityName()

getEntityName() : string

Returns

string

getEntityManager()

getEntityManager() : \Doctrine\ORM\EntityManager

Returns

\Doctrine\ORM\EntityManager

createQueryBuilder()

createQueryBuilder(string  $alias,   $indexBy = null) : \Doctrine\ORM\QueryBuilder

Creates a new QueryBuilder instance that is prepopulated for this entity name.

Parameters

string $alias
$indexBy

Returns

\Doctrine\ORM\QueryBuilder

isExpectedObject()

isExpectedObject(  $object) : boolean

Checks entity

Parameters

$object

Throws

\Pivot\Core\Exception\InvalidArgumentException

Returns

boolean

getQbWithChildren()

getQbWithChildren()