public function callbackRule(callable $callback, $expected, $value, $priority = 0)
    {
        $key = is_string($callback) ? $callback : $this->getFreeKey();

        $this
            ->defineMap($key, $callback, $priority)
            ->rule($key, $expected, $value)
        ;

        return $this;
    }
public function callbackRule(callable $callback, $expected, $value, $priority = 0)
    {
        $key = is_string($callback) ? $callback : $this->getFreeKey();

        $this
            ->defineMap($key, $callback, $priority)
            ->rule($key, $expected, $value)
        ;

        return $this;
    }
public function callbackRule ( callable $ callback , $ expected , $ value , $ priority = 0 ) { $ key = is_string ( $ callback ) ? $ callback : $ this -> getFreeKey ( ) ; $ this -> defineMap ( $ key , $ callback , $ priority ) -> rule ( $ key , $ expected , $ value ) ; return $ this ; }
Create a rule providing directly a callable

@param callable $callback
@param mixed $expected
@param mixed $value
@param int $priority

@return $this
Create a rule providing directly a callable