protected function buildCacheOnce()
    {
        if ($this->aliasCache !== null) {
            return;
        }

        $this->aliasCache = [];

        foreach ($this->aliases as $typeName => $rules) {
            foreach ($rules as $name => $rule) {
                if (isset($this->aliasCache[$name])) {
                    $firstTypeName = $this->aliasCache[$name]['type'];
                    throw new MisConfiguredException("Double entry for name '$name' (under $typeName and $firstTypeName)");
                }

                $this->aliasCache[$name] = [
                    'type' => $typeName,
                    'rule' => $rule,
                ];
            }
        }
    }
protected function buildCacheOnce()
    {
        if ($this->aliasCache !== null) {
            return;
        }

        $this->aliasCache = [];

        foreach ($this->aliases as $typeName => $rules) {
            foreach ($rules as $name => $rule) {
                if (isset($this->aliasCache[$name])) {
                    $firstTypeName = $this->aliasCache[$name]['type'];
                    throw new MisConfiguredException("Double entry for name '$name' (under $typeName and $firstTypeName)");
                }

                $this->aliasCache[$name] = [
                    'type' => $typeName,
                    'rule' => $rule,
                ];
            }
        }
    }
protected function buildCacheOnce ( ) { if ( $ this -> aliasCache !== null ) { return ; } $ this -> aliasCache = [ ] ; foreach ( $ this -> aliases as $ typeName => $ rules ) { foreach ( $ rules as $ name => $ rule ) { if ( isset ( $ this -> aliasCache [ $ name ] ) ) { $ firstTypeName = $ this -> aliasCache [ $ name ] [ 'type' ] ; throw new MisConfiguredException ( "Double entry for name '$name' (under $typeName and $firstTypeName)" ) ; } $ this -> aliasCache [ $ name ] = [ 'type' => $ typeName , 'rule' => $ rule , ] ; } } }
Build a cache for faster name lookups.
Build a cache for faster name lookups .