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:----ijoze71+3yc6hxlJ/OvcC93LPWFFge2mE6WZg3YGZS9cpAa93bNXkyJhKXgfeedXkDASUNpqNBvicP0+nipr8gYp5wbCR9KU9eXwZKKLrSUdpiLW7AxImXUcAH2MGXtjoUTW24nSOy9hDSDsAbmPkSrbEMI0gsmQephNa3zNxPhvAi39P2CRPAUnTzjAsHh9N5/r6Toix5LtmdzHAnc/Cb0YSC2zoyn9MCsS954EG63kn4laBY+gpEZccqY+YJ/9AdEuiTmkMu0R6gkLgsKA1r/bjJfTiOD8tJAmHMGkagmRzfSo9djSDwDGcxCvChp0pPRqDf25AteIz4K1JNh3Hn8hFQFPKAwV2DHm+r5HjRcCSiC5SGr62odDNBxf9/eOqGLAI2bZb4BOeJuqe1YNg88PiAyqnA8StDmIpIsn7nAIKux8Xya02r1q7nbCgvlukiPQ84nnYimqw/r2RIRRbaQfPx+6QE8j0P5QUZTwZ9P67dE8Sxyseis2UjwSKlqg0IRj6fJTm2xfjwZ28qoRTZuqhGjP58Suhwy4PFa90Vni0E2UHsBwF1pfP30vdaP1tKNvaIAfgUTpWMgqrRnuXQH74WmHXE2ewonvIfYVmSbuwm6hF7q5TO32BeD25SJ/1siqRRB4F14YHn8tR+fBFWPbqkD2oMuI1/0G/C6YGf0=----ATTACHMENT:----NDA3ODI3NzU1NDY5NzMzNSA1ODAwNDI4MzY0NTA3NjIxIDc3MzI5ODgxMjQyNTQ4NTY=