LLMS_REST_Database_Resource::get( int $id, bool $hydrate = true )
Retrieve an API Key object instance.
Parameters Parameters
- $id
-
(int) (Required) API Key ID.
- $hydrate
-
(bool) (Optional) If true, pulls all key data from the database on instantiation.
Default value: true
Return Return
(obj|false)
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-database-resource.php
public function get( $id, $hydrate = true ) {
$obj = new $this->model( $id, $hydrate );
if ( $obj && $obj->exists() ) {
return $obj;
}
return false;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0-beta.1 | Introduced. |