Файловый менеджер - Редактировать - /home/tuudkjt/globeasy/wp-content/plugins/reviewx/vendor/hassankhan/config/src/Writer/Json.php
Назад
<?php namespace Rvx\Noodlehaus\Writer; use Rvx\Noodlehaus\Exception\WriteException; /** * JSON Writer. * * @package Config * @author Jesus A. Domingo <jesus.domingo@gmail.com> * @author Hassan Khan <contact@hassankhan.me> * @author Filip Š <projects@filips.si> * @author Mark de Groot <mail@markdegroot.nl> * @link https://github.com/noodlehaus/config * @license MIT */ class Json extends AbstractWriter { /** * {@inheritdoc} * Writes an array to a JSON file. */ public function toFile($config, $filename) { $data = $this->toString($config); $success = @\file_put_contents($filename, $data . \PHP_EOL); if ($success === \false) { throw new WriteException(['file' => $filename]); } return $data; } /** * {@inheritdoc} * Writes an array to a JSON string. */ public function toString($config, $pretty = \true) { return \json_encode($config, $pretty ? \JSON_UNESCAPED_SLASHES | \JSON_PRETTY_PRINT : 0); } /** * {@inheritdoc} */ public static function getSupportedExtensions() { return ['json']; } }
| ver. 1.6 |
Github
|
.
| PHP 8.1.34 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка