ReflectionProperty::hasHook

Returns whether the property has a given hook defined

&reftitle.description; public `bool` `ReflectionProperty::hasHook` `PropertyHookType` `type`

Returns whether the property has a given hook defined.

&reftitle.parameters;

`PropertyHookType`

- The type of hook to check for.

&reftitle.returnvalues;

Returns &true; if the hook is defined on this property, &false; if not.

&reftitle.examples;

### `ReflectionProperty::hasHook` example

    <?php
    class Example
    {
        public string $name { get => "Name here"; }
    }

    $rClass = new \ReflectionClass(Example::class);
    $rProp = $rClass->getProperty('name');
    var_dump($rProp->hasHook(PropertyHookType::Get));
    var_dump($rProp->hasHook(PropertyHookType::Set));
    ?>

&example.outputs;

    bool(true)
    bool(false)

&reftitle.seealso;

- `ReflectionMethod`
- `PropertyHookType`