class SimpleBlockContentTest extends Axmls implements TestInterface (View source)

Traits

Helpful search methods

Properties

protected SimpleXMLElement $rawXML from  XmlParser
protected bool $ignoreExistingTables from  XmlParser
private $em
private $locator
private $scanTables

Methods

__construct(EntityManagerInterface $em, FileLocator $locator)

No description

setIgnoreExistingTables(bool $ignoreExistingTables)

No description

parse(Connection $db)

Transforms the XML from Adodb XML into Doctrine DBAL Schema.

from  Axmls
string|null
getDatabaseVersion(Connection $db)

No description

_setTableOpts(Connection $db, SimpleXMLElement $table, $schemaTable)

No description

from  Axmls
_setPrimaryKeys(Connection $db, SimpleXMLElement $table, $schemaTable)

No description

from  Axmls
_setIndexes(Connection $db, SimpleXMLElement $table, $schemaTable)

No description

from  Axmls
_getColumnOptions(Connection $db, SimpleXMLElement $column)

No description

from  Axmls
_getColumnType(SimpleXMLElement $column)

No description

from  Axmls
bool
applyQueryFilters(Runner $report, QueryBuilder|QueryBuilder $query, bool $having = true, string $filterColumn = 'content')

Take a query object and add "or having" or "and having" for each filter on the Report This object gives us one place to implement new types of filters added to the Report class

iterable
iterateQuery($query, int $perPage = 1000)

Take a query and paginate over it in chunks defined by $perPage You can iterate over the return value and expect to receive all rows one by one.

auditDbal(Runner $report, string $table, string $idSelect, array $scanColumns, array $joins, callable $findingPopulator)

Audit a dbal table or set of tables

addBlockWarning(Runner $report, Block $block, string $content = '')

No description

void
run(Runner $report)

No description

void
auditTable(Runner $report, string $table, array $columns)

No description

bool
addTable(BlockType $type)

Locate a block's db.xml file and track its table to be scanned

Details

__construct(EntityManagerInterface $em, FileLocator $locator)

No description

Parameters

EntityManagerInterface $em
FileLocator $locator

setIgnoreExistingTables(bool $ignoreExistingTables)

No description

Parameters

bool $ignoreExistingTables

parse(Connection $db)

Transforms the XML from Adodb XML into Doctrine DBAL Schema.

Parameters

Connection $db

protected string|null getDatabaseVersion(Connection $db)

No description

Parameters

Connection $db

Return Value

string|null

protected _setTableOpts(Connection $db, SimpleXMLElement $table, $schemaTable)

No description

Parameters

Connection $db
SimpleXMLElement $table
$schemaTable

protected _setPrimaryKeys(Connection $db, SimpleXMLElement $table, $schemaTable)

No description

Parameters

Connection $db
SimpleXMLElement $table
$schemaTable

protected _setIndexes(Connection $db, SimpleXMLElement $table, $schemaTable)

No description

Parameters

Connection $db
SimpleXMLElement $table
$schemaTable

protected _getColumnOptions(Connection $db, SimpleXMLElement $column)

No description

Parameters

Connection $db
SimpleXMLElement $column

protected _getColumnType(SimpleXMLElement $column)

No description

Parameters

SimpleXMLElement $column

protected bool applyQueryFilters(Runner $report, QueryBuilder|QueryBuilder $query, bool $having = true, string $filterColumn = 'content')

Take a query object and add "or having" or "and having" for each filter on the Report This object gives us one place to implement new types of filters added to the Report class

Parameters

Runner $report
QueryBuilder|QueryBuilder $query
bool $having
string $filterColumn

Return Value

bool

protected iterable iterateQuery($query, int $perPage = 1000)

Take a query and paginate over it in chunks defined by $perPage You can iterate over the return value and expect to receive all rows one by one.

Parameters

$query
int $perPage

Return Value

iterable

protected auditDbal(Runner $report, string $table, string $idSelect, array $scanColumns, array $joins, callable $findingPopulator)

Audit a dbal table or set of tables

Parameters

Runner $report
string $table
string $idSelect
array $scanColumns
array $joins

[[$joinTable, $fromTable, $alias, $criteria]]

callable $findingPopulator

function($item, $report)

protected addBlockWarning(Runner $report, Block $block, string $content = '')

No description

Parameters

Runner $report
Block $block
string $content

void run(Runner $report)

No description

Parameters

Runner $report

Return Value

void

private void auditTable(Runner $report, string $table, array $columns)

No description

Parameters

Runner $report
string $table
array $columns

Return Value

void

private bool addTable(BlockType $type)

Locate a block's db.xml file and track its table to be scanned

Parameters

BlockType $type

Return Value

bool