Returns the annotation with the provided name

@param string $name
@return AnnotationInterface

@throws \Slick\Common\Exception\InvalidArgumentException
501478
public function getAnnotation($name)
    {
        if (!$this->hasAnnotation($name)) {
            throw new Exception\InvalidArgumentException(
                "Annotation {$name} is not found in this list."
            );
        }

        $name = str_replace('@', '', $name);
        return $this[$name];
    }
952886
public function getAnnotation($name)
    {
        $returnValue = array();
        
        if (isset($this->annotations[$name])) {
            $returnValue = array(
                'name' => $name,
                'value' => $this->annotations[$name]
            );
        } else {
            $returnValue = null;
        }
        
        return (array) $returnValue;
    }
862741
public function getManager($name = null)
    {
        $name = $name ?: $this->getDefaultManagerName();

        if (!$this->managerExists($name)) {
            throw new InvalidArgumentException(sprintf('Doctrine Manager named "%s" does not exist.', $name));
        }

        if (isset($this->managersMap[$name])) {
            return $this->managersMap[$name];
        }

        return $this->managersMap[$name] = $this->getService(
            $this->getManagerBindingName($this->managers[$name])
        );
    }
883706
public function getValidator($name)
    {
        if (!isset($this->validators[$name])) {
            $rules = $this->getRules();
            if (!isset($rules[$name])) {
                throw new InvalidArgumentException('Can not find rule with name: ' . $name);
            } else {
                $options = $rules[$name];
                $options['elements'] = $options[0];
                $options['type'] = $options[1];
                unset($options[0], $options[1]);
                $this->setValidator($name, $options);
            }
        }

        return $this->validators[$name];
    }
586213
public function getParameter($name)
    {
        if (!array_key_exists($name, $this->parameters)) {
            throw new InvalidArgumentException(sprintf('Parameter: "%s" does not exist', $name));
        }

        return $this->parameters[$name];
    }
273839
public function find($name)
    {
        if ($this->is_registered($name)) {
            return $this->items[$name];
        }
        $model = $this->adaptor->getModel($name);
        if ($model) {
            return $model;
        }
        throw new \InvalidArgumentException("{$name} not registered");
    }
222536
public function getProvider(string $name) : string
    {
        $providers = $this->getProviders();
        if (!in_array($name, array_keys($providers))) {
            throw new InvalidArgumentException("Provider for [$name] is not configured");
        }

        return $providers[$name];
    }
1071376
public function get($name)
    {
        if (!isset($this->helpers[$name])) {
            throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
        }

        return $this->helpers[$name];
    }
824628
public function get($name)
    {
        $toggle = $this->collection->get($name);
        if(!$toggle){
            throw new \InvalidArgumentException("Cannot find Toggle with name $name");
        }

        return $toggle;
    }
429360
public function find(string $name)
    {
        if (! \array_key_exists($name, $this->keyMap)) {
            throw new InvalidArgumentException("Name [{$name}] is not available.");
        }

        return $this->controls[$this->keyMap[$name]];
    }
201341
public function find(string $name): Column
    {
        if (! \array_key_exists($name, $this->keyMap)) {
            throw new InvalidArgumentException("Name [{$name}] is not available.");
        }

        return $this->columns[$this->keyMap[$name]];
    }
285964
public function getCallable($name)
     {
         if (method_exists($this, $name)) {
             return call_user_func([$this, $name]);
         } else {
             throw new InvalidArgumentException('Undefined property: '.get_class($this)."::$name");
         }
     }
489407
public function getGetParameter($name)
    {
        if (!$this->hasGetParameter($name)) {
            throw new \InvalidArgumentException(sprintf('The GET request parameter "%s" does not exist.', $name));
        }

        return $this->getParameters[rawurlencode($name)];
    }
345046
public function get($name)
    {
        if ($this->cache->has($name)) {
            return $this->loader->load($this->cache->get($name));
        }

        if (!$this->cache->isFresh()) {
            $this->refresh();

            return $this->get($name);
        }

        throw new \InvalidArgumentException(sprintf(
            'Unknown resource named "%s" for the host "%s"',
            $name,
            $this->host
        ));
    }
241466
protected function load($name)
    {
        if ($name instanceof Template) {
            return $name;
        }

        try {
            return $this->environment->loadTemplate((string) $name);
        } catch (LoaderError $e) {
            throw new \InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
        }
    }
695527
protected function getParam($name)
    {
        if (!isset($this->params[$name])) {
            throw new \InvalidArgumentException("Param is not valid: ".$name);
        }

        return $this->params[$name];
    }
481212
public function getField($name)
    {
        if ($this->has($name)) {
            return $this->fields[$name];
        }

        throw new \InvalidArgumentException(
            'Field with name ['. $name .'] does not exist in class '.get_class($this)
        );
    }