PHP 클래스 Bravo3\Orm\Services\Maintenance

파일 보기 프로젝트 열기: bravo3/orm 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$entity_manager EntityManager
$logger Psr\Log\LoggerInterface

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
maintenanceOperation ( callable $closure ) Execute a function in maintenance mode

비공개 메소드들

메소드 설명
rebuildRecords ( Traversable $records, integer $batch_size ) Re-persist an array of records

메소드 상세

__construct() 공개 메소드

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

maintenanceOperation() 보호된 메소드

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

rebuild() 공개 메소드

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

프로퍼티 상세

$entity_manager 보호되어 있는 프로퍼티

protected EntityManager,Bravo3\Orm\Services $entity_manager
리턴 EntityManager

$logger 보호되어 있는 프로퍼티

protected LoggerInterface,Psr\Log $logger
리턴 Psr\Log\LoggerInterface