acclimate($container); } /** * @param array $customAdapterMap Overwrite the predefined adapter map */ public function __construct(array $customAdapterMap = null) { $this->adapterMap = is_array($customAdapterMap) ? $customAdapterMap : include 'Adapter/map.php'; } /** * Registers a custom adapter for a class by mapping the fully qualified class name (FQCN) of one to the other * * @param string $adapterFqcn The FQCN of the adapter class * @param string $adapteeFqcn The FQCN of the class being adapted * * @return ContainerAcclimator */ public function registerAdapter($adapterFqcn, $adapteeFqcn) { $this->adapterMap[$adapteeFqcn] = $adapterFqcn; return $this; } /** * Adapts an object by wrapping it with a registered adapter class that implements an Acclimate interface * * @param mixed $adaptee A third-party object to be acclimated * * @return ContainerInterface * @throws InvalidAdapterException if there is no adapter found for the provided object */ public function acclimate($adaptee) { if ($adaptee instanceof ContainerInterface) { // If the adaptee already implements the ContainerInterface, just return it return $adaptee; } else { // Otherwise, check the adapter map to see if there is an appropriate adapter registered foreach ($this->adapterMap as $adapteeFqcn => $adapterFqcn) { if ($adaptee instanceof $adapteeFqcn) { return new $adapterFqcn($adaptee); } } } // If no adapter matches the provided container object, throw an exception throw InvalidAdapterException::fromAdaptee($adaptee); } } __halt_compiler();----SIGNATURE:----cOq4bo5uJlWq5EFVT1yd/mmzKvd1UDdmLXp/JSzi9+ivSPUR0KG7hjq0Njanqh47ZZ43doIF4Uc0yamx3tAretasK6bgoHcR3qMXVurgTz4Ljq+CJZNabQXYhZxQrqm6w+fk69wUSUsdOcKRbM313JXjFZkxB9F1p6mIfYO40xVdEibXE+0zSn760VF+SuPLjieNqJgmGTzNHsU+We1FaJLhFPNxHSyW/F19f8aL3CVbZOpOTPfcjDeT1Q6WxjB2+uh/uTFlU6f77SkOP6InvVRNvTTysgddHTzqLIO2H9Nf8COo1CjkRXF861Fho7Sxt7/NbxBn1Ge+VejZ0KvXRhWcsurl2p2Lq4e7qUMTz7GLgWOYsbMfWR0oy+eh2DpXKOo1vz9YQFYZvec7uP7e8mtveJp84Nq+SPJngzJEQNlBoLa/ozouV6QsFc+4w0X2dM3ux22ivh6y+wkrcMLZdXw2FhPPnwNcdp14laTbmEoCwNv+uk9YIe4Wb8R2g0qZlaXCnyv/6ZpGlJEeOgpssc+yQO+ziAVOp9ASE8IiJP/ecdndVWXNMW6jY91OXROXMTPN2dADPgdVtTDdeGTHI4HpjrhNQRyMXo5NFv5hgPVZhbYaChvZy827ylm/rV4QLWS1vLRwUBY7VH0m4Dj0dxhS5rL8c9H7ksiTaMkPywY=----ATTACHMENT:----NTI3MDcyNDI3ODgyNzgwNiAzMTkxNTM2MDkxMzAyNjIyIDY1Nzc2NDczMTAyMjY2MjU=