2014-09-05 19:18:49 +02:00
|
|
|
<?php
|
|
|
|
namespace Szurubooru\Controllers\ViewProxies;
|
|
|
|
|
|
|
|
class TokenViewProxy extends AbstractViewProxy
|
|
|
|
{
|
2014-09-25 23:53:47 +02:00
|
|
|
public function fromEntity($token, $config = [])
|
2014-09-05 19:18:49 +02:00
|
|
|
{
|
|
|
|
$result = new \StdClass;
|
|
|
|
if ($token)
|
|
|
|
{
|
2014-09-13 23:58:13 +02:00
|
|
|
$result->name = $token->getName();
|
|
|
|
$result->purpose = $token->getPurpose();
|
2014-09-05 19:18:49 +02:00
|
|
|
}
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
}
|