diff --git a/Converting-your-code-to-the-generalized-format.md b/Converting-your-code-to-the-generalized-format.md index 1abb48e..8c713b6 100644 --- a/Converting-your-code-to-the-generalized-format.md +++ b/Converting-your-code-to-the-generalized-format.md @@ -18,3 +18,59 @@ $sws = Sws::readSws(''); require_once 'vendor/autoload.php'; $reader = IOFactory::createReader('Pairtwo-6'); $sws = $reader->read(''); +``` + +## Changed getters and setters +## Getters + +| Property | Old code | New Code (getter) | Current Status | +|------------------------------|-------------------------------------------------|------------------------------------------|----------------| +| Player::Absent | `Player::getAbsent()` | `Player::getBinaryData('Absent')` | Consideration | +| Player::Club | `Player::getClub()` | `Player::getIds()['Club']` | Temporary | +| Player::ExtraPts | `Player::getExtraPts()` | `Player::getBinaryData('XtraPts')` | Final | +| Player::FideElo | `Player::getFideElo()` | `Player::getElos()['fide']` | Temporary | +| Player::FideId | `Player::getFideId()` | `Player::getIds()['fide']` | Temporary | +| Player::KbsbElo | `Player::getKbsbElo()` | `Player::getElos()['kbsb']` | Temporary | +| Player::KbsbId | `Player::getKbsbId()` | `Player::getIds()['kbsb']` | Temporary | +| Player::NumberOfTies | `Player::getNumberofTies()` | `Player::getBinaryData('NumberOfTies')` | Final | +| Player::Points | `Player::getPoints()` | `Player::getBinaryData('Points')` | Final | +| Player::Rank | `Player::getRank()` | `Player::getBinaryData('Rank')` | Final | +| Player::ScoreAmerican | `Player::getScoreAmerican()` | `Player::getBinaryData('ScoreAmerican')` | Final | +| Player::ScoreBucholtz | `Player::getScoreBucholtz()` | `Player::getBinaryData('ScoreBuchholz')` | Final | +| Sws::Players($i)_ColorDiff | `Sws::getBinaryData('Players($i)_ColorDiff')` | `Player::getBinaryData('ColorDiff')` | Final | +| Sws::Players($i)_ColorPref | `Sws::getBinaryData('Players($i)_ColorPref')` | `Player::getBinaryData('ColorPref')` | Final | +| Sws::Players($i)_Float | `Sws::getBinaryData('Players($i)_Float')` | `Player::getBinaryData('Float')` | Final | +| Sws::Players($i)_FloatBefore | `Sws::getBinaryData('Players($i)_FloatBefore')` | `Player::getBinaryData('FloatBefore')` | Final | +| Sws::Players($i)_FloatPrev | `Sws::getBinaryData('Players($i)_FloatPrev')` | `Player::getBinaryData('FloatPrev')` | Final | +| Sws::Players($i)_HelpValue | `Sws::getBinaryData('Players($i)_HelpValue')` | `Player::getBinaryData('HelpValue')` | Final | +| Sws::Players($i)_Paired | `Sws::getBinaryData('Players($i)_Paired')` | `Player::getBinaryData('Paired')` | Final | +| Sws::Players($i)_NameLength | `Sws::getBinaryData('Players($i)_NameLength')` | `Player::getBinaryData('NameLength')` | Final | +| Sws::Players($i)_Namepos | `Sws::getBinaryData('Players($i)_Namepos')` | `Player::getBinaryData('NamePos')` | Final | +| Sws::Players($i)_TieMatch | `Sws::getBinaryData('Players($i)_TieMatch')` | `Player::getBinaryData('Tiematch')` | Final | + +## Setters + +| Property | Old code | New Code (setter) | Current Status | +|------------------------------|-----------------------------------------------------------------|--------------------------------------------------|----------------| +| Player::Absent | `Player::setAbsent($value)` | `Player::setBinaryData('Absent', $value)` | Consideration | +| Player::Club | `Player::setClub($value)` | `(not implemented, yet)` | Temporary | +| Player::ExtraPts | `Player::setExtraPts($value)` | `Player::setBinaryData('XtraPts', $value)` | Final | +| Player::FideElo | `Player::setFideElo($value)` | `(not implemented, yet)` | Temporary | +| Player::FideId | `Player::setFideId($value)` | `(not implemented, yet)` | Temporary | +| Player::KbsbElo | `Player::setKbsbElo($value)` | `(not implemented, yet)` | Temporary | +| Player::KbsbId | `Player::setKbsbId($value)` | `(not implemented, yet)` | Temporary | +| Player::NumberOfTies | `Player::setNumberofTies($value)` | `Player::setBinaryData('NumberOfTies', $value)` | Final | +| Player::Points | `Player::setPoints($value)` | `Player::setBinaryData('Points', $value)` | Final | +| Player::Rank | `Player::setRank($value)` | `Player::setBinaryData('Rank', $value)` | Final | +| Player::ScoreAmerican | `Player::setScoreAmerican($value)` | `Player::setBinaryData('ScoreAmerican', $value)` | Final | +| Player::ScoreBucholtz | `Player::setScoreBucholtz($value)` | `Player::setBinaryData('ScoreBuchholz', $value)` | Final | +| Sws::Players($i)_ColorDiff | `Sws::setBinaryData('Players($i, $value)_ColorDiff', $value)` | `Player::setBinaryData('ColorDiff', $value)` | Final | +| Sws::Players($i)_ColorPref | `Sws::setBinaryData('Players($i, $value)_ColorPref', $value)` | `Player::setBinaryData('ColorPref', $value)` | Final | +| Sws::Players($i)_Float | `Sws::setBinaryData('Players($i, $value)_Float', $value)` | `Player::setBinaryData('Float', $value)` | Final | +| Sws::Players($i)_FloatBefore | `Sws::setBinaryData('Players($i, $value)_FloatBefore', $value)` | `Player::setBinaryData('FloatBefore', $value)` | Final | +| Sws::Players($i)_FloatPrev | `Sws::setBinaryData('Players($i, $value)_FloatPrev', $value)` | `Player::setBinaryData('FloatPrev', $value)` | Final | +| Sws::Players($i)_HelpValue | `Sws::setBinaryData('Players($i, $value)_HelpValue', $value)` | `Player::setBinaryData('HelpValue', $value)` | Final | +| Sws::Players($i)_Paired | `Sws::setBinaryData('Players($i, $value)_Paired', $value)` | `Player::setBinaryData('Paired', $value)` | Final | +| Sws::Players($i)_NameLength | `Sws::setBinaryData('Players($i, $value)_NameLength', $value)` | `Player::setBinaryData('NameLength', $value)` | Final | +| Sws::Players($i)_Namepos | `Sws::setBinaryData('Players($i, $value)_Namepos', $value)` | `Player::setBinaryData('NamePos', $value)` | Final | +| Sws::Players($i)_TieMatch | `Sws::setBinaryData('Players($i, $value)_TieMatch', $value)` | `Player::setBinaryData('Tiematch', $value)` | Final | \ No newline at end of file