Current Path: > home > > > > transcarter > www > wp-content > > plugins > elementor-pro > core > utils
Operation : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 Software : Apache Server IP : 198.54.126.42 | Your IP: 216.73.216.135 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
collection.php | File | 1478 bytes | March 09 2023 22:15:56. | |
registrar.php | File | 1167 bytes | March 09 2023 22:15:56. |
<?php namespace ElementorPro\Core\Utils; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } /** * Basic items registrar. * * TODO: Move to Core. */ class Registrar { /** * @var array */ private $items; /** * Registrar constructor. * * @return void */ public function __construct() { $this->items = []; } /** * Register a new item. * * @param $instance - Item instance. * @param string $id - Optional - For BC - Deprecated. * * @return boolean - Whether the item was registered. */ public function register( $instance, $id = null ) { // TODO: For BC. Remove in the future. if ( ! $id ) { // Get the ID or default to the class name. $id = ( method_exists( $instance, 'get_id' ) ) ? $instance->get_id() : get_class( $instance ); } if ( $this->get( $id ) ) { return false; } $this->items[ $id ] = $instance; return true; } /** * Get an item by ID. * * @param string $id * * @return array|null */ public function get( $id = null ) { if ( ! $id ) { return $this->items; } return isset( $this->items[ $id ] ) ? $this->items[ $id ] : null; } }
SILENT KILLER Tool