@param string $namespace
@param string $name

@return string
@throws InvalidArgumentException
503742
public static function uuid3(string $namespace, string $name): string
    {
        $bytes = static::getBytes($namespace);

        $hash = \md5($bytes . $name);

        return static::uuidFromHash($hash, 3);
    }
305640
public static function v3(string $namespace, string $name): string
	{
		$hash = md5(self::toBinary($namespace) . $name);

		return sprintf
		(
			'%s-%s-%x-%x-%s',
			substr($hash, 0, 8),
			substr($hash, 8, 4),
			(hexdec(substr($hash, 12, 4)) & 0x0fff) | 0x3000,
			(hexdec(substr($hash, 16, 4)) & 0x3fff) | 0x8000,
			substr($hash, 20, 12)
		);
	}
1154700
public function findNamespace(string $namespace): string
	{
		$allNamespaces = $this->getNamespaces();

		$expr = preg_replace_callback(
			'{([^:]+|)}',
			function ($matches)
			{
				return preg_quote($matches[1]) . '[^:]*';
			},
			$namespace
		);

		$namespaces = preg_grep('{^' . $expr . '}', $allNamespaces);

		if (empty($namespaces))
		{
			throw new NamespaceNotFoundException(sprintf('There are no commands defined in the "%s" namespace.', $namespace));
		}

		$exact = \in_array($namespace, $namespaces, true);

		if (\count($namespaces) > 1 && !$exact)
		{
			throw new NamespaceNotFoundException(sprintf('The namespace "%s" is ambiguous.', $namespace));
		}

		return $exact ? $namespace : reset($namespaces);
	}
229788
public function valueAlignmentForNamespace( $namespace, $name )
	{
		$prefix = "";

		switch ( $namespace )
		{
			case "http://xbrl.sec.gov/dei/2014-01-31":

				$prefix = "dei";
				break;

			case 'http://fasb.org/us-types/2014-01-31':
				$prefix = "us-types";
				break;

			default:
				return parent::valueAlignmentForNamespace( $namespace, $name );
		}

		$type = "$prefix:$name";

		switch ( $type )
		{
			case 'us-types:dateStringItemType':
			case 'dei:fiscalPeriodItemType':
			case 'dei:submissionTypeItemType':
			case 'dei:centralIndexKeyItemType':
			case 'dei:yesNoItemType':
			case 'dei:filerCategoryItemType':
			default:
				return "left";
		}

	}
1000328
static function getConfigByName($namespace, $name) 
    {
        $info = CommonConfigModel::where('namespace', $namespace)
                                    ->where('name', $name)
                                    ->first();
        if (!empty($info)) {
            return $info;
        }
        return array();
    }
493119
public function classNamespace(string $element, string $name = ''): string
    {
        $localNamespace = trim($this->getOption($element, 'namespace', ''), '\\');
        list($namespace, $name) = $this->parseName($name);

        if (!empty($namespace)) {
            $localNamespace .= '\\' . Inflector::classify($namespace);
        }

        if (empty($this->baseNamespace())) {
            return $localNamespace;
        }

        return trim($this->baseNamespace() . '\\' . $localNamespace, '\\');
    }
1161770
private function getParameters($namespace)
    {
        $parameters = [];

        /** @var Parameter $parameter */
        foreach ($this->parameterRepository->findBy(['namespace' => $namespace]) as $parameter) {
            $parameters[$parameter->getName()] = $parameter->getValue();
        }

        return $parameters;
    }
151737
public static function normalize($name)
	{
		if (!static::isValid($name))
		{
			throw new InvalidArgumentException("Invalid tag name '" . $name . "'");
		}

		// Non-namespaced tags are uppercased
		if (strpos($name, ':') === false)
		{
			$name = strtoupper($name);
		}

		return $name;
	}
1028564
protected function parseNamespaceSegments(string $name): array
    {
        $segments = explode(static::NAMESPACE_DELIMITER, $name);
        if (count($segments) !== 2) {
            throw new \InvalidArgumentException("Template [{$name}] has an invalid name.");
        }
        if (! isset($this->paths[$segments[0]])) {
            throw new \InvalidArgumentException("No namespace defined for [{$segments[0]}].");
        }

        return $segments;
    }
1236495
public function resolve(string $namespace, string $version, string $name): string
    {
        $class = str_replace('.', '\\', $name);

        if (! array_key_exists($version, $this->supportedVersions)) {
            $version = $this->defaultVersion;
        }

        return sprintf('%s\%s\%s\%s', $namespace, $this->supportedVersions[$version], $class);
    }
960430
public function withNameSpace($namespace)
    {
        $namespace = (string) $namespace;

        if (! isset(static::$namespaces[$namespace])) {
            $new = clone $this;
            $new->setNamespace($namespace);
            $new->setEnabled($this->enabled);
            static::$namespaces[$namespace] = $new;
        }

        return static::$namespaces[$namespace];
    }
1019017
protected static function _namespaceIsset($namespace, $name = null)
    {
        if (self::$_readable === false) {
            /**
             * @see Zend_Session_Exception
             */
            require_once 'Zend/Session/Exception.php';
            throw new Zend_Session_Exception(self::_THROW_NOT_READABLE_MSG);
        }

        if ($name === null) {
            return ( isset($_SESSION[$namespace]) || isset(self::$_expiringData[$namespace]) );
        } else {
            return ( isset($_SESSION[$namespace][$name]) || isset(self::$_expiringData[$namespace][$name]) );
        }
    }
407499
protected function isClient(string $namespace, string $name): bool
    {
        if (preg_match('/^Spryker[a-zA-Z]*\\\\Client\\\\[a-zA-Z]+$/', $namespace) && preg_match('/^(.*?)(Client|ClientInterface)$/', $name)) {
            return true;
        }

        return false;
    }
27280
protected function file( string $namespace ): FileInterface {

    $meta = $this->getNamespace( $namespace );
    return $this->path->get( $namespace . '.' . $meta[ 'format' ] );
  }
1106048
private function namespace_to_dir( $namespace ) {
		$namespace = ltrim( $namespace, '\\' );
		$dir       = null;
		if ( preg_match( "#\A{$this->app->define->plugin_namespace}#", $namespace ) ) {
			$namespace = preg_replace( "#\A{$this->app->define->plugin_namespace}#", '', $namespace );
			$dir       = $this->app->define->plugin_src_dir;
		} elseif ( preg_match( "#\A{$this->app->define->lib_namespace}#", $namespace ) ) {
			$namespace = preg_replace( "#\A{$this->app->define->lib_namespace}#", '', $namespace );
			$dir       = $this->app->define->lib_src_dir;
		}

		if ( isset( $dir ) ) {
			$namespace = ltrim( $namespace, '\\' );
			$namespace = strtolower( $namespace );
			$path      = $dir . DS . str_replace( '\\', DS, $namespace );
			$path      = rtrim( $path, DS );
			if ( is_dir( $path ) ) {
				return $path;
			}
		}

		return false;
	}
211728
public function factory(string $name, string $namespace = '', ...$args)
    {
        $class = false !== strpos($name, '\\') ? $name : $namespace . ucwords($name);

        if (class_exists($class)) {
            return Container::getInstance()->invokeClass($class, $args);
        }

        throw new ClassNotFoundException('class not exists:' . $class, $class);
    }
155611
private function getClassNameCandidates(array $namespaces, $name)
    {
        $className = str_replace(' ', '', ucwords($name));

        return array_map(function ($namespace) use ($className) { return $namespace.$className; }, $namespaces);
    }