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:----HxoOlt4R2djuFioGM9KY9AyGzf5B7L5liP3rqi+czGD7GMYnU44B/LSrLp85ggOjIRm+d3TXX2qSSLYZ0+zhXED6uv6n6VtOtw53Cfa/1sxWso9+KqFFnZdPsicvmNPfbCHOAwr2H5sM7oynAsEl2uD0WmlXHtU4yb6tzccKzXHmg26MimWSogDauYNJMf21fK4q/YZSt+QBbab1Vq4+03BvVTx8utpL4Z/Ydn9ayzz23KndcOSp4UashfFU3f/wVnhR5vxGXn4CVmJi2GIyd4gBZPBVCiZTci5i2/NQLHW7zebfPWCYIsGeuHcwnv7c1enM+rpDWNPXK69zFmZBfsXfKwMb71gVmwIPLwoa3a6kCaqQwX2WZFX7MpoJ4PWC5XChyCBzBaDjsYbu1cuuoZYRN43TQgOuXIA5/NjHj1/NpPYM35O5I2y0j1U+shytXjzsBQtocFR7BRKWNNd7rixQgL9lNYxecCIRUUCzGBHJE4Zn4dUEsLDC5SlUjszhwWEh8BUyCJcp8bYtWshkzvJSRCddIqPSza4AEAnFkZ+VFLXr0xycTxbK8hMPjRpOKuiH1ujFib+69ALnSVaznaoYLyOpg5aXBuym1nyEhavq6IMt23jjYU0lcNFXXqVoyh+9MRhI4f7n7PxDkO5NHFchUHocqFpRTUYP9+7Midc=----ATTACHMENT:----ODk4NTI3MjU1MzE5NzIwNCA2OTE5Mjg3Njc0NDk5NjU5IDEwNDY0NjA2NjgzMTk3Mjg=