Public Member Functions | |
retrieve ($username) | |
retrieveById (string $id) | |
Public Member Functions inherited from snuze\Persistence\Interfaces\MapperInterface | |
__construct (StorageProviderInterface $storage) | |
persist ($object) | |
delete ($object) | |
The AccountMapperInterface is part of the storage provider design.
It defines any additional methods that must be implemented for persisting an Account subtype object, above and beyond the requirements in MapperInterface.
This file is part of Snuze, a PHP client for the Reddit API. Copyright 2019 Shaun Cummiskey shaun @sha unc.c omhttps://shaunc.com/ Repository: https://github.com/snuze/snuze/ Documentation: https://snuze.shaunc.com/
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
snuze\Persistence\Interfaces\AccountMapperInterface::retrieve | ( | $username | ) |
Implementers must expose a retrieve() method that accepts an account's username and returns a UserAccount object, or null if the account isn't persisted.
string | $username | The username of the account to retrieve |
Implements snuze\Persistence\Interfaces\MapperInterface.
Implemented in snuze\Persistence\MySQL\AccountMapper.
snuze\Persistence\Interfaces\AccountMapperInterface::retrieveById | ( | string | $id | ) |
Implementers must expose a method to return an account by its internal Reddit "thing" ID, without "t2_" prepended, e.g. "bva2".
string | $id | The account's Reddit ID without "t2_" prepended |
Implemented in snuze\Persistence\MySQL\AccountMapper.