public static function SetCacheTimeout($scope, $timeout) { if (is_integer($timeout)) { return phoxy::SetCacheTimeout($scope, "{$timeout}s"); } phoxy_return_worker::NewCache([$scope => $timeout]); }
public function __call($name, $arguments) { $ret = $this->Call($name, $arguments); phoxy_protected_assert(!empty($ret['data']), "Probably internal inconsistence inside phoxy, please bug report"); // raw calls do not affects restrictions if ($this->ShouldSkipPostProcess($name)) { return $ret; } else { phoxy_return_worker::NewCache($ret['cache']); } if (!isset($ret['data'])) { return phoxy_protected_assert(empty($ret['error']), $ret); } $d = $ret['data']; // Reverse public method translation if (is_array($d) && !empty($d[$name])) { $d = $d[$name]; } if ($this->expect_simple_result && is_array($d) && count($d) === 1 && !isset($d[0])) { return reset($d); } return $d; }