szurubooru/src/Dao/TokenDao.php

26 lines
562 B
PHP
Raw Normal View History

<?php
namespace Szurubooru\Dao;
class TokenDao extends AbstractDao
{
public function __construct(\Szurubooru\DatabaseConnection $databaseConnection)
{
2014-09-14 12:09:22 +02:00
parent::__construct($databaseConnection, 'tokens', \Szurubooru\Entities\Token::class);
}
public function findByName($tokenName)
{
2014-09-14 16:16:15 +02:00
return $this->findOneBy('name', $tokenName);
}
public function deleteByName($tokenName)
{
2014-09-14 16:16:15 +02:00
return $this->deleteBy('name', $tokenName);
}
public function deleteByAdditionalData($additionalData)
{
2014-09-14 16:16:15 +02:00
return $this->deleteBy('additionalData', $additionalData);
}
}