public function register(array $definitions): self
    {
        foreach ($definitions as $name => $callback) {
            if (!is_callable($callback)) {
                throw new \InvalidArgumentException('Values passed to register must be callable');
            }
            $this->definitions[$name] = $callback;
        }
        return $this;
    }
public function register(array $definitions): self
    {
        foreach ($definitions as $name => $callback) {
            if (!is_callable($callback)) {
                throw new \InvalidArgumentException('Values passed to register must be callable');
            }
            $this->definitions[$name] = $callback;
        }
        return $this;
    }
public function register ( array $ definitions ) : self { foreach ( $ definitions as $ name => $ callback ) { if ( ! is_callable ( $ callback ) ) { throw new \ InvalidArgumentException ( 'Values passed to register must be callable' ) ; } $ this -> definitions [ $ name ] = $ callback ; } return $ this ; }
Registers rule definitions.

```php
$registry = new \Caridea\Validate\Registry();
$registry->register([
'adult' => ['My\Validate\AgeRule', 'adult'],
'credit_card' => function(){return new CreditCardRule();},
'something' => 'my_function_that_can_be_called'
]);
```

@param array<string,callable> $definitions Associative array of definition name to function callback
@return $this provides a fluent interface
Registers rule definitions .