PHP Class Owl\Repositories\Fluent\UserRepository

Inheritance: extends AbstractFluent, implements Owl\Repositories\UserRepositoryInterface
Show file Open project: owl/owl Class Usage Examples

Protected Properties

Property Type Description
$table

Public Methods

Method Description
create ( mixed $credentials ) : stdClass Create a new user.
getAll ( ) : stdClass Get all user data.
getByEmail ( string $email ) : stdClass Get a user by email.
getById ( $id ) : stdClass Get a user by user_id.
getByUsername ( string $username ) : stdClass Get a user by username.
getLikeUsername ( string $username ) : stdClass Get users by username like search.
getOwners ( ) : stdClass Get users which role is owner.
getTableName ( ) : string Get a table name.
getUsersToArray ( $users ) : array get users array
updateUser ( integer $id, string $username, string $email, integer $role ) : stdClass Update a user information(username, email, role).

Method Details

create() public method

Create a new user.
public create ( mixed $credentials ) : stdClass
$credentials mixed (email, username, password, role)
return stdClass

getAll() public method

Get all user data.
public getAll ( ) : stdClass
return stdClass

getByEmail() public method

Get a user by email.
public getByEmail ( string $email ) : stdClass
$email string
return stdClass

getById() public method

Get a user by user_id.
public getById ( $id ) : stdClass
$id int
return stdClass

getByUsername() public method

Get a user by username.
public getByUsername ( string $username ) : stdClass
$username string
return stdClass

getLikeUsername() public method

Get users by username like search.
public getLikeUsername ( string $username ) : stdClass
$username string
return stdClass

getOwners() public method

Get users which role is owner.
public getOwners ( ) : stdClass
return stdClass

getTableName() public method

Get a table name.
public getTableName ( ) : string
return string

getUsersToArray() public method

get users array
public getUsersToArray ( $users ) : array
return array

updateUser() public method

Update a user information(username, email, role).
public updateUser ( integer $id, string $username, string $email, integer $role ) : stdClass
$id integer
$username string
$email string
$role integer
return stdClass

Property Details

$table protected property

protected $table