\Amelaye\BioPHP\Domain\Database\Service ParsedDataExtractor

Class ParsedDataExtractor The parsers share no common set of fields, but each exposes what it read through public getters.

Reading those getters is what lets every parser, including one added later, be stored without any code of its own : getBaseRange() becomes "baseRange", isTruePositive() becomes "truePositive", and an object found on the way (a reference, an atom...) is read the same way, recursively.

Summary

Methods
Properties
Constants
extract
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
readGetters
normalize
No private properties found
MAX_DEPTH

Constant

MAX_DEPTH

MAX_DEPTH = 10

Methods

extract()

extract(object  $oSource) : array

Parameters

object $oSource

A parser, once it has read a record

Returns

array —

The fields it exposes, ready to be encoded as JSON

readGetters()

readGetters(object  $oSource, array  $aPath, int  $iDepth) : array

Parameters

object $oSource
array $aPath

Objects being read, to stop on a reference to itself

int $iDepth

Returns

array —

normalize()

normalize(mixed  $mValue, array  $aPath, int  $iDepth) : mixed

Parameters

mixed $mValue
array $aPath
int $iDepth

Returns

mixed —