Accessing Public Attributes in PGC API Calls June 12, 2021 03:06PM |
Registered: 8 years ago Posts: 652 |
Re: Accessing Public Attributes in PGC API Calls June 12, 2021 04:18PM |
Registered: 7 years ago Posts: 4,127 |
Re: Accessing Public Attributes in PGC API Calls June 12, 2021 09:26PM |
Registered: 8 years ago Posts: 652 |
Re: Accessing Public Attributes in PGC API Calls June 26, 2021 09:39PM |
Admin Registered: 8 years ago Posts: 813 |
Re: Accessing Public Attributes in PGC API Calls June 26, 2021 11:46PM |
Registered: 8 years ago Posts: 652 |
Re: Accessing Public Attributes in PGC API Calls June 27, 2021 09:23AM |
Admin Registered: 8 years ago Posts: 813 |
$sandbox = new LuaSandbox(); $sandbox->setMemoryLimit( PGC_LUA_Sandbox::MAXMEM ); $sandbox->setCPULimit( PGC_LUA_Sandbox::MAXCPUTIME ); PGC_LUA_Sandbox::$sandbox = $sandbox; $sandbox->registerLibrary('PGC', [ 'GetCPUUsage' => function() { return [PGC_LUA_Sandbox::$sandbox->getCPUUsage()]; }, 'Log' => 'PGC_LUA_Sandbox::Log', 'GetFinds' => 'PGC_LUA_Sandbox::GetFinds', 'GetHides' => 'PGC_LUA_Sandbox::GetHides', 'HTMLEscape' => 'PGC_LUA_Sandbox::HTMLEscape', ]);