{ $method }( ...$args ); }; } /** * Gets a proxy function for a class method which can be executed only once. * * @since 1.24.0 * * @param string $method Method name. * @return callable A proxy function. */ private function get_method_proxy_once( $method ) { return function ( ...$args ) use ( $method ) { static $called; static $return_value; if ( ! $called ) { $called = true; $return_value = $this->{ $method }( ...$args ); } return $return_value; }; } }