PHP Class Bravo3\Orm\Services\Maintenance

Afficher le fichier Open project: bravo3/orm Class Usage Examples

Protected Properties

Свойство Type Description
$entity_manager EntityManager
$logger Psr\Log\LoggerInterface

Méthodes publiques

Méthode Description
__construct ( EntityManager $entity_manager, Psr\Log\LoggerInterface $logger = null )
rebuild ( string $class_name, integer $batch_size = 100 ) Will rebuild a table, repairing indices and re-serialising content

Méthodes protégées

Méthode Description
maintenanceOperation ( callable $closure ) Execute a function in maintenance mode

Private Methods

Méthode Description
rebuildRecords ( Traversable $records, integer $batch_size ) Re-persist an array of records

Method Details

__construct() public méthode

public __construct ( EntityManager $entity_manager, Psr\Log\LoggerInterface $logger = null )
$entity_manager EntityManager
$logger Psr\Log\LoggerInterface

maintenanceOperation() protected méthode

Execute a function in maintenance mode
protected maintenanceOperation ( callable $closure )
$closure callable

rebuild() public méthode

The end result will be: - new inverse indices will be created - changes to serialisation will be updated on all entities - added/removed fields will be updated on all entities
public rebuild ( string $class_name, integer $batch_size = 100 )
$class_name string
$batch_size integer

Property Details

$entity_manager protected_oe property

protected EntityManager,Bravo3\Orm\Services $entity_manager
Résultat EntityManager

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
Résultat Psr\Log\LoggerInterface