Tournament Generator

HierarchyBase extends Base
in package
implements Exportable

Class HierarchyBase

Extended base for hierarchy objects (Tournament, Category, Round, Group).

Tags
author

Tomáš Vojík vojik@wboy.cz

Interfaces, Classes and Traits

Exportable
Interface Exportable

Table of Contents

$container  : HierarchyContainer
$id  : string|int
$name  : string
__toString()  : string
export()  : ExporterInterface
Prepares a general hierarchy exporter for this hierarchy class
getContainer()  : HierarchyContainer
Get the hierarchy container
getId()  : string|int
Gets the unique identifier of the object
getName()  : string
Gets the name of the object
insertIntoContainer()  : $this
Insert into hierarchical container
setId()  : self
Sets the unique identifier of the object
setName()  : self
Sets the name of the object

Properties

$id

protected string|int $id

$name

protected string $name = ''

Methods

__toString()

public __toString() : string
Return values
string —

Name of the object

getId()

Gets the unique identifier of the object

public getId() : string|int
Return values
string|int —

Unique identifier of the object

getName()

Gets the name of the object

public getName() : string
Return values
string —

Name of the object

insertIntoContainer()

Insert into hierarchical container

public insertIntoContainer(Base $object) : $this
Parameters
$object : Base
Tags
post

Object is added to hierarchy

post

If the object has teams -> add other team container to hierarchy

post

If the object has games -> add other game container to hierarchy

throws
Exception
Return values
$this —

setId()

Sets the unique identifier of the object

public setId(string|int $id) : self
Parameters
$id : string|int

Unique identifier of the object

Tags
throws
InvalidArgumentException

if the provided argument is not of type 'string' or 'int'

Return values
self —

setName()

Sets the name of the object

public setName(string $name) : self
Parameters
$name : string

Name of the object

Return values
self —

Search results