code: 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;
      }
docs: @param $id
  
  @return IDefinition