PHP Class Ojs\ApiBundle\Handler\UserHandler

Mostra file Open project: ojs/ojs

Public Methods

Method Description
__construct ( Doctrine\Common\Persistence\ObjectManager $om, $entityClass, Symfony\Component\Form\FormFactoryInterface $formFactory )
all ( integer $limit = 5, integer $offset ) : array Get a list of Users.
delete ( User $entity ) : User Delete a User.
generateRandomString ( $length = 10 )
get ( mixed $id ) : User Get a User.
patch ( User $entity, array $parameters ) : User Partially update a User.
post ( array $parameters ) : User Create a new User.
put ( User $entity, array $parameters ) : User Edit a User.

Private Methods

Method Description
createUser ( )
processForm ( User $entity, array $parameters, String $method = "PUT" ) : User Processes the form.

Method Details

__construct() public method

public __construct ( Doctrine\Common\Persistence\ObjectManager $om, $entityClass, Symfony\Component\Form\FormFactoryInterface $formFactory )
$om Doctrine\Common\Persistence\ObjectManager
$formFactory Symfony\Component\Form\FormFactoryInterface

all() public method

Get a list of Users.
public all ( integer $limit = 5, integer $offset ) : array
$limit integer the limit of the result
$offset integer starting from the offset
return array

delete() public method

Delete a User.
public delete ( User $entity ) : User
$entity Ojs\UserBundle\Entity\User
return Ojs\UserBundle\Entity\User

generateRandomString() public method

public generateRandomString ( $length = 10 )

get() public method

Get a User.
public get ( mixed $id ) : User
$id mixed
return Ojs\UserBundle\Entity\User

patch() public method

Partially update a User.
public patch ( User $entity, array $parameters ) : User
$entity Ojs\UserBundle\Entity\User
$parameters array
return Ojs\UserBundle\Entity\User

post() public method

Create a new User.
public post ( array $parameters ) : User
$parameters array
return Ojs\UserBundle\Entity\User

put() public method

Edit a User.
public put ( User $entity, array $parameters ) : User
$entity Ojs\UserBundle\Entity\User
$parameters array
return Ojs\UserBundle\Entity\User