FML Update 1.4

This commit is contained in:
Steffen Schröder
2014-08-11 23:15:53 +02:00
parent 44cc71c328
commit 300d817409
50 changed files with 123 additions and 112 deletions

View File

@ -48,22 +48,31 @@ class ManiaLink {
/**
* Create a new ManiaLink object
*
* @param string $maniaLinkId (optional) ManiaLink id
* @param string $maniaLinkId (optional) ManiaLink id
* @param string $maniaLinkName (optional) ManiaLink Name
* @return static
*/
public static function create($maniaLinkId = null) {
return new static($maniaLinkId);
public static function create($maniaLinkId = null, $maniaLinkName = null) {
return new static($maniaLinkId, $maniaLinkName);
}
/**
* Construct a new ManiaLink object
*
* @param string $maniaLinkId (optional) ManiaLink id
* @param string $maniaLinkId (optional) ManiaLink id
* @param string $maniaLinkName (optional) ManiaLink Name
*/
public function __construct($maniaLinkId = null) {
if (!is_null($maniaLinkId)) {
public function __construct($maniaLinkId = null, $maniaLinkName = null) {
if ($maniaLinkId !== null) {
$this->setId($maniaLinkId);
}
if ($maniaLinkName !== false) {
if ($maniaLinkName) {
$this->setName($maniaLinkName);
} else {
$this->setName($maniaLinkId);
}
}
}
/**