szurubooru/src/Dao/TokenDao.php

29 lines
598 B
PHP
Raw Normal View History

<?php
namespace Szurubooru\Dao;
class TokenDao extends AbstractDao
{
public function __construct(\Szurubooru\DatabaseConnection $databaseConnection)
{
parent::__construct(
$databaseConnection,
'tokens',
new \Szurubooru\Dao\EntityConverters\TokenEntityConverter());
}
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);
}
}