芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/optimyar/wp-content/plugins/ithemes-security-pro/core/lib/Stellar_Container.php
container = $container; } public function bind( string $id, $implementation = null ) { $this->container[ $id ] = $this->container->factory( $this->make_builder( $implementation ) ); } public function get( string $id ) { return $this->container[ $id ]; } public function has( string $id ) { return isset( $this->container[ $id ] ); } public function singleton( string $id, $implementation = null ) { $this->container[ $id ] = $this->make_builder( $implementation ); } private function make_builder( $implementation ): \Closure { return static function ( Container $c ) use ( $implementation ) { if ( is_string( $implementation ) && class_exists( $implementation ) ) { return new $implementation(); } if ( $implementation instanceof \Closure ) { return $implementation(); } return $implementation; }; } }