PATH:
home
/
fengshp
/
www
/
wp-content
/
plugins
/
spotlight-social-photo-feeds
/
src
/
core
/
Di
<?php namespace RebelCode\Spotlight\Instagram\Di; use Dhii\Services\Factory; /** * A factory for services that read a local JSON file and return the parsed result. */ class JsonFileService extends Factory { public function __construct(string $fileService, $defaultService = null) { parent::__construct( array_filter([$fileService, $defaultService]), function ($file, $default = null) { if (!is_readable($file)) { return $default; } $json = @file_get_contents($file); if (!is_string($json)) { return $default; } $data = @json_decode($json); return $data === null ? $default : $data; } ); } }
[+]
..
[-] EndPointService.php
[edit]
[-] JsonFileService.php
[edit]
[-] ContainerException.php
[edit]
[-] ArrayMergeExtension.php
[edit]
[-] Container.php
[edit]
[-] ConfigService.php
[edit]
[-] OverrideExtension.php
[edit]
[-] NotFoundException.php
[edit]
[-] ArrayExtension.php
[edit]
[-] DeprefixingContainer.php
[edit]