PHP Class Adldap\Laravel\Commands\Import

Inheritance: extends Illuminate\Console\Command, use trait Adldap\Laravel\Traits\ImportsUsers
Show file Open project: adldap2/adldap2-laravel

Protected Properties

Property Type Description
$description string The description of the console command.
$name string The name of the console command.

Public Methods

Method Description
createModel ( )
display ( array $users = [] ) : void Displays the given users in a table.
getArguments ( ) : array Get the console command arguments.
getFilter ( ) : string Returns the limitation filter for the user query.
getOptions ( ) : array Get the console command options.
getUsers ( ) : array Retrieves users to be imported.
handle ( ) : mixed Execute the console command.
import ( array $users = [] ) : integer Imports the specified users and returns the total number of users successfully imported.
isDeleting ( ) : boolean Returns true / false if users are being deleted if they are disabled in AD.
isLogging ( ) : boolean Returns true / false if the current import is being logged.

Protected Methods

Method Description
delete ( User $user, Model $model ) Soft deletes the specified model if the specified AD account is disabled.
save ( User $user, Model $model ) : boolean Saves the specified user with its model.

Method Details

createModel() public method

public createModel ( )

delete() protected method

Soft deletes the specified model if the specified AD account is disabled.
protected delete ( User $user, Model $model )
$user Adldap\Models\User
$model Illuminate\Database\Eloquent\Model

display() public method

Displays the given users in a table.
public display ( array $users = [] ) : void
$users array
return void

getArguments() public method

Get the console command arguments.
public getArguments ( ) : array
return array

getFilter() public method

Returns the limitation filter for the user query.
public getFilter ( ) : string
return string

getOptions() public method

Get the console command options.
public getOptions ( ) : array
return array

getUsers() public method

Retrieves users to be imported.
public getUsers ( ) : array
return array

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed

import() public method

Imports the specified users and returns the total number of users successfully imported.
public import ( array $users = [] ) : integer
$users array
return integer

isDeleting() public method

Returns true / false if users are being deleted if they are disabled in AD.
public isDeleting ( ) : boolean
return boolean

isLogging() public method

Returns true / false if the current import is being logged.
public isLogging ( ) : boolean
return boolean

save() protected method

Saves the specified user with its model.
protected save ( User $user, Model $model ) : boolean
$user Adldap\Models\User
$model Illuminate\Database\Eloquent\Model
return boolean

Property Details

$description protected property

The description of the console command.
protected string $description
return string

$name protected property

The name of the console command.
protected string $name
return string