PHP Class Sleimanx2\Plastic\Mappings\Mappings

Show file Open project: sleimanx2/plastic Class Usage Examples

Protected Properties

Property Type Description
$connection string The name of the database connection to use.
$resolver Illuminate\Database\ConnectionResolverInterface The database connection resolver instance.
$table string The name of the mappings table.

Public Methods

Method Description
__construct ( Illuminate\Database\ConnectionResolverInterface $resolver, string $table ) Create a new database mapping repository instance.
createRepository ( ) Create the mapping repository data store.
delete ( object $mapping ) Remove mapping from the log.
exits ( ) : mixed Check it the repository table exits.
getConnection ( ) : Illuminate\Database\ConnectionInterface Resolve the database connection instance.
getConnectionResolver ( ) : Illuminate\Database\ConnectionResolverInterface Get the connection resolver instance.
getLast ( ) : array Get the last mapping batch.
getLastBatchNumber ( ) : float | integer Get the next mapping batch number.
getNextBatchNumber ( ) * Get the next mapping batch number
getRan ( ) : array Get the ran mappings.
log ( $file, $batch ) Log that a mapping was run.
reset ( ) Remove all mapping logs from the repository.
setSource ( string $name ) : void Set the information source to gather data.

Protected Methods

Method Description
schema ( ) : Illuminate\Database\Schema\Builder get a schema builder instance.
table ( ) : Builder Get a query builder for the mapping table.

Method Details

__construct() public method

Create a new database mapping repository instance.
public __construct ( Illuminate\Database\ConnectionResolverInterface $resolver, string $table )
$resolver Illuminate\Database\ConnectionResolverInterface
$table string

createRepository() public method

Create the mapping repository data store.
public createRepository ( )

delete() public method

Remove mapping from the log.
public delete ( object $mapping )
$mapping object

exits() public method

Check it the repository table exits.
public exits ( ) : mixed
return mixed

getConnection() public method

Resolve the database connection instance.
public getConnection ( ) : Illuminate\Database\ConnectionInterface
return Illuminate\Database\ConnectionInterface

getConnectionResolver() public method

Get the connection resolver instance.
public getConnectionResolver ( ) : Illuminate\Database\ConnectionResolverInterface
return Illuminate\Database\ConnectionResolverInterface

getLast() public method

Get the last mapping batch.
public getLast ( ) : array
return array

getLastBatchNumber() public method

Get the next mapping batch number.
public getLastBatchNumber ( ) : float | integer
return float | integer

getNextBatchNumber() public method

* Get the next mapping batch number
public getNextBatchNumber ( )

getRan() public method

Get the ran mappings.
public getRan ( ) : array
return array

log() public method

Log that a mapping was run.
public log ( $file, $batch )
$file
$batch

reset() public method

Remove all mapping logs from the repository.
public reset ( )

schema() protected method

get a schema builder instance.
protected schema ( ) : Illuminate\Database\Schema\Builder
return Illuminate\Database\Schema\Builder

setSource() public method

Set the information source to gather data.
public setSource ( string $name ) : void
$name string
return void

table() protected method

Get a query builder for the mapping table.
protected table ( ) : Builder
return Illuminate\Database\Query\Builder

Property Details

$connection protected property

The name of the database connection to use.
protected string $connection
return string

$resolver protected property

The database connection resolver instance.
protected ConnectionResolverInterface,Illuminate\Database $resolver
return Illuminate\Database\ConnectionResolverInterface

$table protected property

The name of the mappings table.
protected string $table
return string