Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /home/claqxcrl/anfangola.com/wp-content/plugins/wp-smushit/core/integrations/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/claqxcrl/anfangola.com/wp-content/plugins/wp-smushit/core/integrations/class-mixpanel.php
<?php

namespace Smush\Core\Integrations;

use Smush\Core\Helper;

/**
 * @method identify( int $user_id )
 * @method register( string $property, mixed $value )
 * @method registerAll( array $properties )
 * @method track( string $event, array $properties = array() )
 */
class Mixpanel {
	private $mixpanel;

	public function __construct( $project_token ) {
		$this->mixpanel = class_exists( '\Mixpanel' ) && method_exists( '\Mixpanel', 'getInstance' ) && $project_token
			? \Mixpanel::getInstance( $project_token, array(
				'error_callback' => array( $this, 'handle_error' ),
			) )
			: null;
	}

	public function handle_error( $code, $data ) {
		Helper::logger()->error( "$code: $data" );
	}

	public function __call( $name, $arguments ) {
		if ( $this->mixpanel && method_exists( $this->mixpanel, $name ) ) {
			return call_user_func_array(
				array( $this->mixpanel, $name ),
				$arguments
			);
		}

		return null;
	}
}

ZeroDay Forums Mini