📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 09:09:14
📂
/ (Root)
/
usr
/
local
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
src
/
Internal
/
DependencyManagement
📍 /usr/local/sitepad/editor/site-data/plugins/kkart-pro/src/Internal/DependencyManagement
🔄 Refresh
✏️
Editing: Definition.php
Read Only
<?php /** * An extension to the Definition class to prevent constructor injection from being possible. */ namespace Automattic\Kkart\Internal\DependencyManagement; use Automattic\Kkart\Vendor\League\Container\Definition\Definition as BaseDefinition; /** * An extension of the definition class that replaces constructor injection with method injection. */ class Definition extends BaseDefinition { /** * The standard method that we use for dependency injection. */ const INJECTION_METHOD = 'init'; /** * Resolve a class using method injection instead of constructor injection. * * @param string $concrete The concrete to instantiate. * * @return object */ protected function resolveClass( string $concrete ) { $resolved = $this->resolveArguments( $this->arguments ); $concrete = new $concrete(); // Constructor injection causes backwards compatibility problems // so we will rely on method injection via an internal method. if ( method_exists( $concrete, static::INJECTION_METHOD ) ) { call_user_func_array( array( $concrete, static::INJECTION_METHOD ), $resolved ); } return $concrete; } }
💾 Save Changes
❌ Cancel