public function getDefinition($id) {
        foreach ($this->definitions as $definition) {
            if ($definition instanceof WildcardDefinition) {
                if ($this->matchRegexPattern($id, $definition->getId())) {
                    return $definition;
                }
            } else if ($definition->getId() == $id) {
                if ($definition instanceof AliasDefinition) {
                    return $definition->getValue();
                }

                return $definition;
            }
        }

        return null;
    }
public function getDefinition($id) {
        foreach ($this->definitions as $definition) {
            if ($definition instanceof WildcardDefinition) {
                if ($this->matchRegexPattern($id, $definition->getId())) {
                    return $definition;
                }
            } else if ($definition->getId() == $id) {
                if ($definition instanceof AliasDefinition) {
                    return $definition->getValue();
                }

                return $definition;
            }
        }

        return null;
    }
@param $id

@return IDefinition