PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
google-site-kit
/
includes
/
Core
/
Util
<?php /** * Class Google\Site_Kit\Core\Util\Method_Proxy_Trait * * @package Google\Site_Kit\Core\Util * @copyright 2020 Google LLC * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * @link https://sitekit.withgoogle.com */ namespace Google\Site_Kit\Core\Util; trait Method_Proxy_Trait { /** * Gets a proxy function for a class method. * * @since 1.17.0 * * @param string $method Method name. * @return callable A proxy function. */ private function get_method_proxy( $method ) { return function ( ...$args ) use ( $method ) { return $this->{ $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 ) { static $calls = array(); return function ( ...$args ) use ( $method, $calls ) { $key = get_class( $this ) . '::' . $method; if ( ! array_key_exists( $key, $calls ) ) { $calls[ $key ] = $this->{ $method }( ...$args ); } return $calls[ $key ]; }; } }
[+]
..
[-] Entity_Factory.php
[edit]
[-] Tracking.php
[edit]
[-] Input.php
[edit]
[-] Uninstallation.php
[edit]
[-] Developer_Plugin_Installer.php
[edit]
[-] User_Input_Settings.php
[edit]
[-] Migrate_Legacy_Keys.php
[edit]
[-] Activation_Flag.php
[edit]
[-] Migration_1_8_1.php
[edit]
[-] Tracking_Consent.php
[edit]
[-] Requires_Javascript_Trait.php
[edit]
[-] Health_Checks.php
[edit]
[-] JSON_File.php
[edit]
[-] Entity.php
[edit]
[-] BC_Functions.php
[edit]
[-] Migration_1_3_0.php
[edit]
[-] Scopes.php
[edit]
[-] Debug_Data.php
[edit]
[-] WP_Query_Factory.php
[edit]
[-] Activation_Notice.php
[edit]
[-] Exit_Handler.php
[edit]
[-] Google_URL_Matcher_Trait.php
[edit]
[-] Synthetic_WP_Query.php
[edit]
[-] WP_Context_Switcher_Trait.php
[edit]
[-] Feature_Flags.php
[edit]
[-] Reset.php
[edit]
[-] Google_URL_Normalizer.php
[edit]
[-] Method_Proxy_Trait.php
[edit]