/** * @return Tokens */ public function getTokens() { if (empty($this->tokens)) { $mapper = DbSingleton::getTokensMapper(); $tokenSet = $mapper->getTokens($this->id); if (!$tokenSet) { return []; } foreach ($tokenSet as $tokenRow) { $this->tokens[] = Tokens::createObj($tokenRow); } } return $this->tokens; }
public function delete() { $mapper = DbSingleton::getTokensMapper(); return $mapper->delete($this->id); }