Tournament Generator

Base
in package
implements WithId

Abstract class with basic setters and getters

Tags
author

Tomáš Vojík vojik@wboy.cz

since
0.3

Interfaces, Classes and Traits

WithId
Identifies an object with an ID

Table of Contents

$id  : string|int
$name  : string
__toString()  : string
getId()  : string|int
Gets the unique identifier of the object
getName()  : string
Gets the name of the object
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

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