protected function _callAnnotation(Controller &$class, $annotation = [], $type = 'class', $annotationType = 'Before') {
        foreach ($annotation[$type] as $action => $annotationClasses) {
            foreach ($annotationClasses as $annotationClass) {
                if ($annotationClass['annotation'] == $annotationType) {
                    /** @var \Gcs\Framework\Core\Annotation\Annotations\Common\Before $instance */
                    $instance = $annotationClass['instance'];

                    $className = $instance->class;
                    $methodName = $instance->method;

                    if (method_exists($className, $methodName)) {
                        if ($className == get_class($class)) {
                            $class->$methodName();
                        }
                        else {
                            $reflectionMethod = new \ReflectionMethod($className, $methodName);
                            echo $reflectionMethod->invoke(new $className());
                        }
                    }
                    else {
                        throw new MissingMethodException('The method "' . $methodName . '" from the class "' . $className . '" does not exist');
                    }
                }
            }
        }
    }