Returns the first extension by the given name.

@param string $name
@return ExtensionContract|null
503435
public function findByName(string $name)
    {
        return $this->first(function(ExtensionContract $extension) use($name) {
            return $extension->getPackage()->getName() === $name;
        });
    }
892059
protected function getExtendFile($name) {
        if (strpos($name, '@') === 0) {
            return $this->factory->invokeTheme('getFile', [substr($name, 1)]);
        }
        if (strpos($name, './') === 0) {
            return $this->file->getDirectory()
                ->getFile($this->factory->fileSuffix(substr($name, 2)));
        }
        if (strpos($name, '../') === 0) {
            return $this->file->getDirectory()->parent()
                ->getFile($this->factory->fileSuffix($name));
        }
        return $name;
    }
22965
public function hasExtension($name)
    {
        return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]);
    }
190938
public static function get($name = null)
    {
        if ($name === null) {
            $name = array_shift(array_keys(self::$containers));
        }
        return self::$containers[$name] ? self::$containers[$name] : null;
    }
493502
protected function findExtensionName($name)
    {
        if ($name == 'foundation') {
            return $name;
        }
        $extensions = app('antares.memory')->make('component')->get('extensions.active');
        foreach ($extensions as $keyname => $extension) {
            if ($name == $extension['name']) {
                return $keyname;
            }
        }
        return false;
    }
1130706
public function getLongName($name)
    {
        if (!$this->isParsed) {
            $this->parseDefinitions();
        } //if

        if (isset($this->shortNames[$name])) {
            return $this->shortNames[$name];
        } else {
            return null;
        } //if
    }
1187311
public function getContent($name)
    {
        return $this->getContents()->filter(function (Content $content) use ($name) {
            return $content->getArea()->getName() == $name;
        })->first();
    }
1043003
public function getFirstAreaByName($name)
    {
        if (!isset($this->areas[$name])) {
            return null;
        }
        if (!isset($this->areas[$name][0])) {
            return null;
        }

        return $this->areas[$name][0];
    }
332916
public function offsetGet($name)
	{
		$name = $this->resolveAlias($name);

		if (!$this->offsetExists($name))
		{
			return null;
		}

		return parent::offsetGet($name);
	}
424271
public XExtension getByName(String name) {
                for (XExtension ext : extensionList) {
                        if (ext.getName().equals(name)) {
                                return ext;
                        }
                }
                return null;
        }
185320
public function getOptionShort($name)
    {
        return isset($this->optionsShort[$name])
            ? $this->optionsShort[$name]
            : null
        ;
    }
463845
public function getPartial(string $name)
    {
        if (isset($this->partials[$name])) {
            return $this->partials[$name];
        }

        return null;
    }
263746
public function getCustomPlugin($name)
    {
        if (isset($this->plugins[$name])) {
            return $this->plugins[$name]['callback'];
        }

        return null;
    }
1081800
protected function findOwnMethod($name) {
    $method = $this->getMethod($name);
    if ($this->qcn === $method->getDeclaringClassName()) {
      return $method;
    }
    return NULL;
  }
547880
public function getFirstTag($name)
    {
        foreach ($this->tags as $i => $tag) {
            if (strtolower($tag->getName()) == $name) {
                return $this->tags[$i];
            }
        }

        return null;
    }
100391
public function getMeta($name)
    {
        return $this->getMetas()->filter(function (ArticleMeta $meta) use ($name) {
            return $meta->getMeta()->getName() == $name;
        })->first();
    }
1249698
public function getForeignKey($name)
    {
        $fields = $this->getForeignFields();

        return isset($fields[$name]) ? $fields[$name] : null;
    }