PHP Interface Owl\Repositories\UserRepositoryInterface

Datei anzeigen Open project: owl/owl Interface Usage Examples

Public Methods

Method Description
create ( mixed $credentials ) : Illuminate\Database\Eloquent\Model Create a new user.
getAll ( ) : Illuminate\Database\Eloquent\Collection Get all user data.
getByEmail ( string $email ) : Illuminate\Database\Eloquent\Model Get a user by email.
getById ( integer $id ) : Illuminate\Database\Eloquent\Model Get a user by user id.
getByUsername ( string $username ) : Illuminate\Database\Eloquent\Model Get a user by username.
getLikeUsername ( string $username ) : Illuminate\Database\Eloquent\Model Get users by username like search.
getOwners ( ) : Illuminate\Database\Eloquent\Model Get users which role is owner.
getUsersToArray ( $users ) : array get users array
updateUser ( integer $id, string $username, string $email, integer $role ) : Illuminate\Database\Eloquent\Model Update a user information(username, email, role).

Method Details

create() public method

Create a new user.
public create ( mixed $credentials ) : Illuminate\Database\Eloquent\Model
$credentials mixed (email, username, password, role)
return Illuminate\Database\Eloquent\Model

getAll() public method

Get all user data.
public getAll ( ) : Illuminate\Database\Eloquent\Collection
return Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Builder

getByEmail() public method

Get a user by email.
public getByEmail ( string $email ) : Illuminate\Database\Eloquent\Model
$email string
return Illuminate\Database\Eloquent\Model

getById() public method

Get a user by user id.
public getById ( integer $id ) : Illuminate\Database\Eloquent\Model
$id integer
return Illuminate\Database\Eloquent\Model

getByUsername() public method

Get a user by username.
public getByUsername ( string $username ) : Illuminate\Database\Eloquent\Model
$username string
return Illuminate\Database\Eloquent\Model

getLikeUsername() public method

Get users by username like search.
public getLikeUsername ( string $username ) : Illuminate\Database\Eloquent\Model
$username string
return Illuminate\Database\Eloquent\Model

getOwners() public method

Get users which role is owner.
public getOwners ( ) : Illuminate\Database\Eloquent\Model
return Illuminate\Database\Eloquent\Model

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 ) : Illuminate\Database\Eloquent\Model
$id integer
$username string
$email string
$role integer
return Illuminate\Database\Eloquent\Model