php-api/src/Topic/TopicBase.php

39 lines
557 B
PHP

<?php
namespace Toloka\PhpApi;
class TopicBase implements TopicInterface {
protected Client $client;
protected int $id;
public function __construct(
Client $client
) {
$this->client = $client;
}
/**
* @return int
*/
public function id(): int {
return $this->id;
}
/**
* @param int $id
*/
public function setId(int $id): void {
$this->id = $id;
}
/**
* {@inheritDoc}
*/
public function url(bool $absolute = TRUE): string {
return $this->client->getBaseUrl() . 't' . $this->id();
}
}