From 14ff5d798decfbc817a04d321273e45747716c7d Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Wed, 6 Mar 2024 12:50:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BB=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20Entity=20?= =?UTF-8?q?=D0=B8=D0=B7=20ClientTable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../administrator/src/Table/ClientTable.php | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/com_oauthserver/administrator/src/Table/ClientTable.php b/com_oauthserver/administrator/src/Table/ClientTable.php index db0f74a..e39d097 100644 --- a/com_oauthserver/administrator/src/Table/ClientTable.php +++ b/com_oauthserver/administrator/src/Table/ClientTable.php @@ -7,18 +7,37 @@ use Joomla\Database\DatabaseDriver; use League\OAuth2\Server\Entities\ClientEntityInterface; /** - * @property int $id - * @property string $name - * @property string $identifier - * @property string|null $secret - * @property int $public - * @property string|null $redirect_uri - * @property int $allow_plain_text_pkce + * @property int $id; + * @property string $identifier; + * @property string $name; + * @property ?string $secret; + * @property string|array|null $redirect_uris; + * @property string|array|null $grants; + * @property string|array|null $scopes; + * @property int $active; + * @property int $public; + * @property int $allow_plain_text_pkce; * * @since version */ -class ClientTable extends Table implements ClientEntityInterface +class ClientTable extends Table { + /** + * Indicates that columns fully support the NULL value in the database + * + * @var boolean + * @since 3.10.0 + */ + protected $_supportNullValue = true; + + /** + * An array of key names to be json encoded in the bind function + * + * @var array + * @since 3.3 + */ + protected $_jsonEncode = ['redirect_uris', 'grants', 'scopes']; + /** * Constructor. * @@ -30,24 +49,4 @@ class ClientTable extends Table implements ClientEntityInterface { parent::__construct('#__webmasterskaya_oauthserver_clients', 'id', $db); } - - public function getIdentifier() - { - return $this->identifier; - } - - public function getName() - { - return $this->name; - } - - public function getRedirectUri() - { - return $this->redirect_uri; - } - - public function isConfidential() - { - return !$this->public; - } } \ No newline at end of file