Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ezpRestClient Class Reference

## Public Member Functions
| getState ()
| setState (array $properties)
| attribute ( $attributeName)
| hasAttribute ( $attributeName)
| __get ( $propertyName)
| __isset ( $propertyName)
| validateSecret ( $secret)
| isAuthorizedByUser ( $scope, $user=null)
| authorizeFor ( $user=null)
| isEndPointValid ( $endPointUri)

## Static Public Member Functions
static | authorizeApplication ( $clientId, $endPointUri, $clientSecret=null)
static | fetchByClientId ( $clientId)

## Public Attributes
| $id = null
| $name = null
| $description = null
| $client_id = null
| $client_secret = null
| $endpoint_uri = null
| $owner_id = null
| $created = null
| $updated = null
| $version = null
const | STATUS_DRAFT = 1
const | STATUS_PUBLISHED = 0

## Protected Member Functions
| _owner ()

## Detailed Description

Persistent object class representing a REST application.

Definition at line 15 of file restclient.php.

## Member Function Documentation

## ◆ __get()

ezpRestClient::__get | ( |  | $propertyName | ) |

eZPersistentObject wrapper method: handles "function attributes"

Parameters

  string | $propertyName |

Returns
  mixed

Definition at line 128 of file restclient.php.

References _owner().

Referenced by attribute().

## ◆ __isset()

ezpRestClient::__isset | ( |  | $propertyName | ) |

Definition at line 158 of file restclient.php.

Referenced by attribute(), and hasAttribute().

## ◆ _owner()

ezpRestClient::_owner | ( |  | ) |
| protected

Returns the eZUser who owns the object

Returns
  eZUser

Definition at line 146 of file restclient.php.

References $owner.

Referenced by __get().

## ◆ attribute()

ezpRestClient::attribute | ( |  | $attributeName | ) |

eZPersistentObject wrapper method

Parameters

  string | $attributeName |

Returns
  mixed

Definition at line 102 of file restclient.php.

References __get(), __isset(), and eZDebug\writeError().

## ◆ authorizeApplication()

static ezpRestClient::authorizeApplication | ( |  | $clientId,
|  |  | $endPointUri,
|  |  | $clientSecret = `null`
| ) |  |
| static

Definition at line 173 of file restclient.php.

References fetchByClientId().

## ◆ authorizeFor()

ezpRestClient::authorizeFor | ( |  | $user = `null` | ) |

Authorizes this application for a user

Parameters

  eZUser | $user |

Returns
  void

Definition at line 246 of file restclient.php.

References $id, $session, $user, and ezpRestAuthorizedClient.

## ◆ fetchByClientId()

static ezpRestClient::fetchByClientId | ( |  | $clientId | ) |
| static

Fetches a rest application using a client Id

Parameters

  string | $clientId |

Returns
  ezpRestClient

Definition at line 195 of file restclient.php.

References $q, $results, and $session.

Referenced by authorizeApplication(), ezpOauthUtility\doRefreshToken(), and ezpOauthUtility\doRefreshTokenWithAuthorizationCode().

## ◆ getState()

ezpRestClient::getState | ( |  | ) |

Definition at line 73 of file restclient.php.

References $client_id, $client_secret, $created, $description, $endpoint_uri, $id, $name, $owner_id, $result, $updated, and $version.

## ◆ hasAttribute()

ezpRestClient::hasAttribute | ( |  | $attributeName | ) |

eZPersistentObject wrapper method

Parameters

  string | $attributeName |

Returns
  bool

Definition at line 117 of file restclient.php.

References __isset().

## ◆ isAuthorizedByUser()

ezpRestClient::isAuthorizedByUser | ( |  | $scope,
|  |  | $user = `null`
| ) |  |

Checks if this application has been authorized by the current user

Parameters

  mixed | $scope | The requested security scope
  eZUser | $user | The user to check authorization for. Will check for current user if not given.

Returns
  bool

Todo:
  Handle non-authorization using

Definition at line 229 of file restclient.php.

References $user, eZUser\currentUser(), and ezpRestAuthorizedClient\fetchForClientUser().

## ◆ isEndPointValid()

ezpRestClient::isEndPointValid | ( |  | $endPointUri | ) |

Validates an attempt (endpoint) redirect URI against the one configured for the client

Parameters

  string | $endPointUri |

Returns
  bool true if the URI is valid, false otherwise

Definition at line 263 of file restclient.php.

## ◆ setState()

ezpRestClient::setState | ( | array | $properties | ) |

Definition at line 89 of file restclient.php.

## ◆ validateSecret()

ezpRestClient::validateSecret | ( |  | $secret | ) |

Convenience method to validate a client secret.

Parameters

  $secret |

Returns
  bool

Definition at line 214 of file restclient.php.

References $client_secret.

## Member Data Documentation

## ◆ $client_id

ezpRestClient::$client_id = null

Definition at line 35 of file restclient.php.

Referenced by getState().

## ◆ $client_secret

ezpRestClient::$client_secret = null

Definition at line 41 of file restclient.php.

Referenced by getState(), and validateSecret().

## ◆ $created

ezpRestClient::$created = null

Definition at line 59 of file restclient.php.

Referenced by getState().

## ◆ $description

ezpRestClient::$description = null

Definition at line 29 of file restclient.php.

Referenced by getState().

## ◆ $endpoint_uri

ezpRestClient::$endpoint_uri = null

Definition at line 47 of file restclient.php.

Referenced by getState().

## ◆ $id

ezpRestClient::$id = null

Definition at line 17 of file restclient.php.

Referenced by authorizeFor(), and getState().

## ◆ $name

ezpRestClient::$name = null

Definition at line 23 of file restclient.php.

Referenced by getState().

## ◆ $owner_id

ezpRestClient::$owner_id = null

Definition at line 53 of file restclient.php.

Referenced by getState().

## ◆ $updated

ezpRestClient::$updated = null

Definition at line 65 of file restclient.php.

Referenced by getState().

## ◆ $version

ezpRestClient::$version = null

Definition at line 71 of file restclient.php.

Referenced by getState().

## ◆ STATUS_DRAFT

const ezpRestClient::STATUS_DRAFT = 1

Definition at line 268 of file restclient.php.

## ◆ STATUS_PUBLISHED

const ezpRestClient::STATUS_PUBLISHED = 0

Definition at line 269 of file restclient.php.

The documentation for this class was generated from the following file:

- restclient.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.