You are here

public function Carbon::__isset in Persian Date for Drupal 8 8.4

Check if an attribute exists on the object

Parameters

string $name:

Return value

bool

File

src/Library/Carbon/Carbon.php, line 715

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function __isset($name) {
  try {
    $this
      ->__get($name);
  } catch (InvalidArgumentException $e) {
    return false;
  }
  return true;
}