芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/fakerphp/faker/src/Faker/Generator.php
providers, $provider); } public function getProviders() { return $this->providers; } public function seed($seed = null) { if ($seed === null) { mt_srand(); } else { mt_srand((int) $seed, MT_RAND_PHP); } } public function format($formatter, $arguments = []) { return call_user_func_array($this->getFormatter($formatter), $arguments); } /** * @param string $formatter * * @return callable */ public function getFormatter($formatter) { if (isset($this->formatters[$formatter])) { return $this->formatters[$formatter]; } foreach ($this->providers as $provider) { if (method_exists($provider, $formatter)) { $this->formatters[$formatter] = [$provider, $formatter]; return $this->formatters[$formatter]; } } throw new \InvalidArgumentException(sprintf('Unknown formatter "%s"', $formatter)); } /** * Replaces tokens ('{{ tokenName }}') with the result from the token method call * * @param string $string String that needs to bet parsed * @return string */ public function parse($string) { return preg_replace_callback('/\{\{\s?(\w+)\s?\}\}/u', [$this, 'callFormatWithMatches'], $string); } protected function callFormatWithMatches($matches) { return $this->format($matches[1]); } /** * @param string $attribute * * @return mixed */ public function __get($attribute) { return $this->format($attribute); } /** * @param string $method * @param array $attributes * * @return mixed */ public function __call($method, $attributes) { return $this->format($method, $attributes); } public function __destruct() { $this->seed(); } public function __wakeup() { $this->formatters = []; } }