Gc\Registry::offsetExists PHP Method

offsetExists() public method

Returns true if the $index is a named value in the registry, or false if $index was not found in the registry.
public offsetExists ( string $index ) : boolean
$index string Index
return boolean
    public function offsetExists($index)
    {
        return array_key_exists($index, $this);
    }

Usage Example

Example #1
0
 /**
  * Returns true if the $index is a named value in the registry,
  * or false if $index was not found in the registry.
  *
  * @param string $index Index
  *
  * @return boolean
  */
 public static function isRegistered($index)
 {
     if (self::$registry === null) {
         return false;
     }
     return self::$registry->offsetExists($index);
 }