AuthShield = $AuthShield; $this->container=(null!==$container) ? $container : $AuthShield->getAppShield()->getContainer(); } /** public function auth(\UMA\JsonRpc\Request $request){ return 'admin' === $this->container->get('webfan.app.fsm.user')->getCurrentState()->getName(); } * {@inheritdoc} */ public function __invoke(\UMA\JsonRpc\Request $request): \UMA\JsonRpc\Response { set_time_limit(120); $params = $request->params(); $config = $this->AuthShield->getAppShield()->config->export(); $projects = []; $finder = $this->container->get('finder'); $finder->name('frdl.project.json'); $finder->depth('< 5'); $theDir = (isset($config['wsdir']) && is_dir($config['wsdir']) ) ? $config['wsdir'] : \webfan\hps\patch\Fs::getRelativePath(getcwd(), \webfan\hps\patch\Fs::getRootDir($_SERVER['DOCUMENT_ROOT'])); foreach ($finder->in($theDir) as $file) { // $absoluteFilePath = $file->getRealPath(); // $fileNameWithExtension = $file->getRelativePathname(); $projects[\webfan\hps\patch\Fs::getRelativePath($config['wsdir'] . 'frdl-projects', dirname($file->getRealPath()))] = json_decode($file->getContents()); } //try{ // return new \UMA\JsonRpc\Success($request->id(), $config); //}catch(\Exception $e){ // return new \UMA\JsonRpc\Error($request->id(), 'Could get config'); //} return new \UMA\JsonRpc\Success($request->id(), $projects); } public function getSpec(): ?\stdClass { return \json_decode(<<<'JSON' { "$schema": "https://json-schema.org/draft-07/schema#", "type": ["null", "array", "object"], "properties": { }, "required" : [], "additionalProperties": true } JSON ); } } __halt_compiler();----SIGNATURE:----YL6XsDYvXg5LvS4bNy3L4SSRLeCT2VdSP9onMI9U4bM9HtXiQtL1LzWVjna9tp6Y0N0WImNMhR+/gL7onhR8IhKFaHT5wDePSbu5Mg9fK2V5zDJQ+xah2gVy+qZEnbmisEWPBlI4hT/cim3Z8vLP/BjRGAZEyMpuOwP4WnYryKgsE57C8wbCyA9Ydw8vCGMTPl6jRm9EsVxAis1KDiSnGGduzXJgTv+sgHHGuh8c1MF+I5d42HqdjTOdvSa2EiZFr+BCg8puCnlX5Rna9WvSG5ukCMzbzhEhWT5ZTV+IXaaKD4vnGQjnLEblO4lrK6cRAp7MAzVgFAuLR6G3XijXh40O/MT79iVfUZHrwEdlVo3fVe8U8IbDjzXHZjrdviWFcn2fDX26+sU3ARxvYNQY62dkzLyWQ1Ox0Yq89gl4EyAusYzoLIDxM2zEMU3z7ZLXOAX2OiBwHbPQbjJHDfAIDPaEet5hRliqAv2J/F5D8Ieoe+gdrWZq7HFnrzXsZjn2dVkXgPGIkhEa5+3qHsqOnJ7Xo2ZAVU/7J1nL1W1XoVZga4H/S+ITMND1jOlMSILlEsT8UvgnnMWoMy1jyYQOLmStfNz2YwtVBisSAV/jndhjw201ajwMYsbxMO5uCbg/lbHwQyP7UscgPOJg+/e8tUIliNelnCx0aSV544TvOuU=----ATTACHMENT:----MzcxOTE3MTcxNTI4OTYzMiAxNzM4MjM5NjQ3MzIxMjE1IDM4MDI2MzA4NTE5ODIzNjc=