Replaces previously resolved instances.

@param string $hint Type hint
962332
protected function replaceInstances(string $hint): void
	{
		if(isset($this->replacers[$hint]))
		{
			$instance = $this->get($hint);

			foreach($this->replacers[$hint] as $replacer)
			{
				$replacer($instance);
			}
		}
	}
627644
public static function whereAmI($hint, $composerFileName = self::COMPOSER_FILENAME)
    {

        $hint = static::determineHintLocation($hint);

        if (isset(static::$cachedLookups[$hint]))
        {
            return static::$cachedInstances[static::$cachedLookups[$hint]];
        }

        $packageInfo = new static($hint, $composerFileName);

        static::$cachedLookups[$hint] = $packageInfo->getComposerJsonFilename();

        // try again. could already have a hit
        if (isset(static::$cachedInstances[static::$cachedLookups[$hint]]))
        {
            return static::$cachedInstances[static::$cachedLookups[$hint]];
        }

        static::$cachedInstances[static::$cachedLookups[$hint]] = $packageInfo;

        return $packageInfo;
    }
886546
public function prependNamespace($namespace, $hints)
    {
        /** @var ViewFinderInterface $viewFinder */
        foreach ($this->viewFinders as $viewFinder) {
            try {
                $viewFinder->prependNamespace($namespace, $hints);
            } catch (\Exception $e) {
            }
        }
    }
540512
public function replace(string $find, string $replace = '', bool $caseSensitive = true) : Manipulator
    {
        $replaced = $caseSensitive ? str_replace($find, $replace, $this->string) :
                                     str_ireplace($find, $replace, $this->string);

        return new static($replaced);
    }
994605
public static function cls($class, $since = null, $suggest = null): void
    {
        if ($suggest && preg_match('/\s/', $suggest) === 0) {
            $suggest = ltrim($suggest, '\\');
            $suggest = "Use ${suggest} instead.";
        }
        $class = ltrim($class, '\\');

        static::warn($class, $since, $suggest);
    }
330345
public function hint($hint)
    {
        if (null !== $hint && !is_array($hint)) {
            throw new \InvalidArgumentException(sprintf('The hint "%s" is not valid.', $hint));
        }

        $this->hint = $hint;

        return $this;
    }
1243335
protected function fixDefaultProblem(CodeWarning $warning): void
    {
        $newContent = '';

        if (!$this->prevIsWhitespace) {
            $newContent = ' ';
        }

        $newContent .= '.';

        if (!$this->nextIsWhitespace) {
            $newContent .= ' ';
        }

        $fixer = $this->getFile()->fixer;

        $fixer->beginChangeset();
        $fixer->replaceToken($this->stackPos, $newContent);
        $fixer->endChangeset();
    }
780466
public function refresh($refresh = true)
    {
        $this->unitOfWorkHints[Query::HINT_REFRESH] = (boolean) $refresh;
        return $this;
    }
781633
protected function __fixPersianString($text){
       
       if(is_null($text))
          return null;
       $replacePairs = array(
                chr(0xD9).chr(0xA0) => chr(0xDB).chr(0xB0),
                chr(0xD9).chr(0xA1) => chr(0xDB).chr(0xB1),
                chr(0xD9).chr(0xA2) => chr(0xDB).chr(0xB2),
                chr(0xD9).chr(0xA3) => chr(0xDB).chr(0xB3),
                chr(0xD9).chr(0xA4) => chr(0xDB).chr(0xB4),
                chr(0xD9).chr(0xA5) => chr(0xDB).chr(0xB5),
                chr(0xD9).chr(0xA6) => chr(0xDB).chr(0xB6),
                chr(0xD9).chr(0xA7) => chr(0xDB).chr(0xB7),
                chr(0xD9).chr(0xA8) => chr(0xDB).chr(0xB8),
                chr(0xD9).chr(0xA9) => chr(0xDB).chr(0xB9),
                chr(0xD9).chr(0x83) => chr(0xDA).chr(0xA9),
                chr(0xD9).chr(0x89) => chr(0xDB).chr(0x8C),
                chr(0xD9).chr(0x8A) => chr(0xDB).chr(0x8C),
                chr(0xDB).chr(0x80) => chr(0xD9).chr(0x87) . chr(0xD9).chr(0x94));
       return strtr($text, $replacePairs);
   }
1018732
protected function replaceRequestInstance()
    {
        \array_pop($this->requestStack);

        $this->container->instance('request', \end($this->requestStack));
    }
99805
public function replaceAttributeClass($class, $replace)
    {
        if ($this->offsetExists('class')) {
            foreach ($this->storage[ 'class' ] as $key => $value) {
                if (preg_match("/\b$class\b/i", $value)) {
                    $this->storage[ 'class' ][ $key ] = str_replace($class, $replace, $value);
                }
            }

            if (count($this->storage[ 'class' ]) == 0) {
                unset($this->storage[ 'class' ]);
            }
        }
    }
56770
public function setPrompt($prompt)
    {
        if ($prompt === $this->prompt) {
            return $this;
        }

        $this->prompt = $prompt;

        return $this->redraw();
    }
253997
public function usage($hint_about_help = true)
    {
        echo self::$EXEC_NAME." [-f pakefile] {options} targets…\n";

        if (true === $hint_about_help) {
            echo 'Try "';
            echo pakeColor::colorize(self::$EXEC_NAME.' help', 'INFO');
            echo '" for more information'."\n";
        }
    }
71309
def setHint(self, hint):
        
        self._hint = self.formatText(hint)
        self.update()
        self.hintChanged.emit(self.hint())
631325
public function replace($handler, $bindTo = true)
    {
        if ($bindTo && $handler instanceof Closure) {
            $handler = $handler->bindTo($this, $this);
        }
        $this->handler = $handler;
    }
440755
public final void setHint(@Nullable final CharSequence hint) {
        this.hint = hint;

        if (getAdapter() != null) {
            ProxySpinnerAdapter proxyAdapter = (ProxySpinnerAdapter) getAdapter();
            setAdapter(proxyAdapter.getAdapter());
        }
    }
45285
public function onReplace(string $hint, callable $replacer, ?string $eventName = null): void
	{
		$hint = $this->resolveAlias($hint);

		$eventName === null ? ($this->replacers[$hint][] = $replacer) : ($this->replacers[$hint][$eventName] = $replacer);
	}