protected function setParams($position, $required, $param)
    {
        if (!empty($required['class']) && !is_a($param, $required['class'])) {
            $this->errors[] = sprintf("You can't put an instance of %s in the parameter #%s $%s of type %s",
                get_class($param), $position, $required['name'], $required['class']);
            return false;
        }
        $this->methodParams[$position] = $param;
    }