You are here

protected function GenericResource::checkEmptyOrInvalidString in Auth0 Single Sign On 8.2

Check that a variable is a string and is not empty.

Parameters

mixed $var The variable to check.:

string $var_name The variable name.:

Return value

void

Throws

EmptyOrInvalidParameterException If $var is empty or is not a string.

19 calls to GenericResource::checkEmptyOrInvalidString()
Roles::addPermissions in vendor/auth0/auth0-php/src/API/Management/Roles.php
Associate permissions with a role. Required scope: "update:roles"
Roles::addUsers in vendor/auth0/auth0-php/src/API/Management/Roles.php
Add one or more users to a role. Required scopes: "update:roles"
Roles::create in vendor/auth0/auth0-php/src/API/Management/Roles.php
Create a new Role. Required scope: "create:roles"
Roles::delete in vendor/auth0/auth0-php/src/API/Management/Roles.php
Delete a single Role by ID. Required scope: "delete:roles"
Roles::get in vendor/auth0/auth0-php/src/API/Management/Roles.php
Get a single Role by ID. Required scope: "read:roles"

... See full list

File

vendor/auth0/auth0-php/src/API/Management/GenericResource.php, line 127

Class

GenericResource
Class GenericResource. Extended by Management API endpoints classes.

Namespace

Auth0\SDK\API\Management

Code

protected function checkEmptyOrInvalidString($var, $var_name) {
  if (!is_string($var) || empty($var)) {
    throw new EmptyOrInvalidParameterException($var_name);
  }
}