# hasClass

```php
hasClass ( string $class ) : bool
```

| Parameter | Description
| --------- | -----------
| `class`   | Specifies the class name to search for.

Returns true if the current node has the specified class name.

**Examples**

```php
$node->hasClass('article');
```