Overview

Namespaces

  • pgn
    • exceptions
    • tags
  • utils

Classes

  • Annotator
  • Black
  • BlackElo
  • BlackNA
  • BlackTitle
  • BlackType
  • BlackUSCF
  • Board
  • Date
  • ECO
  • Event
  • EventCountry
  • EventDate
  • EventRounds
  • EventSponsor
  • EventType
  • FEN
  • Mode
  • NIC
  • Opening
  • PlyCount
  • Result
  • Round
  • Section
  • SetUp
  • Site
  • Source
  • SourceDate
  • Stage
  • SubVariation
  • Tag
  • Termination
  • Time
  • TimeControl
  • UknownTag
  • UTCDate
  • UTCTime
  • Variation
  • White
  • WhiteElo
  • WhiteNA
  • WhiteTitle
  • WhiteType
  • WhiteUSCF
  • Overview
  • Namespace
  • Class

Class White

Description of White: The White tag value is the name of the player or players of the white pieces. The names are given as they would appear in a telephone directory. The family or last name appears first. If a first name or first initial is available, it is separated from the family name by a comma and a space. Finally, one or more middle initials may appear. (Wherever a comma appears, the very next character should be a space. Wherever an initial appears, the very next character should be a period.) If the name is unknown, a single question mark should appear as the tag value.

The intent is to allow meaningful ASCII sorting of the tag value that is independent of regional name formation customs. If more than one person is playing the white pieces, the names are listed in alphabetical order and are separated by the colon character between adjacent entries. A player who is also a computer program should have appropriate version information listed after the name of the program.

The format used in the FIDE Rating Lists is appropriate for use for player name tags.

Examples:

[White "Tal, Mikhail N."]

[White "van der Wiel, Johan"]

[White "Acme Pawngrabber v.3.2"]

pgn\tags\Tag
Extended by pgn\tags\White

Direct known subclasses

pgn\tags\Annotator, pgn\tags\Black, pgn\tags\EventSponsor
Namespace: pgn\tags
Author: Geraldo
See: pgn_standard.txt
Located at pgn/tags/White.php
Methods summary
public string
# getName( )

Returns

string
White

Assert

() === 'White'
public boolean
# validate( string $data )

Validation rules: "...(Wherever a comma appears, the very next character should be a space..." Tests based on description:

Validation rules: "...(Wherever a comma appears, the very next character should be a space..." Tests based on description:

Parameters

$data

Returns

boolean
true if data is valid and false if not.

Assert

(NULL) === false
("ab") === true
(", ") === true
(",a") === false
("a") === true

Assert("?")

=== true Basic path tests:


Assert("acme

Pawngrabber v.3.2") === true

Assert("tal,

Mikhail N.") === true

Assert("van

der Wiel, Johan") === true

Overrides

pgn\tags\Tag::validate()
Methods inherited from pgn\tags\Tag
__toString(), createTag(), formatted(), get(), getDefaultValue(), parse(), parseTagName(), parseTagValue(), set(), validPattern()
Properties inherited from pgn\tags\Tag
$data, $errorMsg
API documentation generated by ApiGen