Documentation

RecordStorageInterface

Interface RecordStorageInterface

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Methods

find()  : ParsedRecord|null
store()  : ParsedRecord
Parses the lines of one record and stores what was read. A record already stored under the same format and identifier is updated rather than duplicated.
storeFile()  : int
Parses every record of one or several data files and stores them in a collection.

Methods

find()

public find(string $sDbFormat, string $sEntryId) : ParsedRecord|null
Parameters
$sDbFormat : string

Database format, e.g. "GENBANK"

$sEntryId : string

Identifier of the record

Return values
ParsedRecord|null

store()

Parses the lines of one record and stores what was read. A record already stored under the same format and identifier is updated rather than duplicated.

public store(string $sDbFormat, array<string|int, mixed> $aLines[, Collection|null $oCollection = null ]) : ParsedRecord
Parameters
$sDbFormat : string

Database format, e.g. "GENBANK"

$aLines : array<string|int, mixed>

The lines of the record

$oCollection : Collection|null = null

The collection the record belongs to

Tags
throws
Exception
Return values
ParsedRecord

storeFile()

Parses every record of one or several data files and stores them in a collection.

public storeFile(string $sDbName, string $sDbFormat, string ...$aDataFiles) : int
Parameters
$sDbName : string

Name of the collection, created when it does not exist

$sDbFormat : string

Database format, e.g. "GENBANK"

$aDataFiles : string

Files to parse

Tags
throws
Exception
Return values
int —

Number of records stored

On this page

Search results