mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-24 02:44:51 +03:00
добавил prepareTable и getTable
This commit is contained in:
parent
6089848c68
commit
a4b238e1c4
@ -43,4 +43,21 @@ class AccessTokenModel extends AdminModel implements RevokedModelInterface
|
|||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Webmasterskaya\Component\OauthServer\Administrator\Table\AccessTokenTable $table
|
||||||
|
* @return void
|
||||||
|
* @since version
|
||||||
|
*/
|
||||||
|
protected function prepareTable($table)
|
||||||
|
{
|
||||||
|
if ($table->expiry instanceof \DateTime || $table->expiry instanceof \DateTimeImmutable) {
|
||||||
|
$table->expiry = $table->expiry->format($table->getDbo()->getDateFormat());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTable($name = 'AccessToken', $prefix = 'Administrator', $options = [])
|
||||||
|
{
|
||||||
|
return parent::getTable($name, $prefix, $options);
|
||||||
|
}
|
||||||
}
|
}
|
@ -35,4 +35,21 @@ class RefreshTokenModel extends AdminModel implements RevokedModelInterface
|
|||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Webmasterskaya\Component\OauthServer\Administrator\Table\RefreshTokenTable $table
|
||||||
|
* @return void
|
||||||
|
* @since version
|
||||||
|
*/
|
||||||
|
protected function prepareTable($table)
|
||||||
|
{
|
||||||
|
if ($table->expiry instanceof \DateTime || $table->expiry instanceof \DateTimeImmutable) {
|
||||||
|
$table->expiry = $table->expiry->format($table->getDbo()->getDateFormat());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTable($name = 'RefreshToken', $prefix = 'Administrator', $options = [])
|
||||||
|
{
|
||||||
|
return parent::getTable($name, $prefix, $options);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user