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:----EzbFLXSNDt0J9ZoKKRDdudNwiwJLyA4zt2LdwJr0dZfPrQnCWjbsVMhoKhEFtD7AdQZgMzRLH5aLazjR0Bqg6hB1YE6ejPt+ae9g4rWwV8fC6p4WnB0TH2PI7QIzqOzI6odX+qXQK4dECslHWx+MuvEdeYLc1uz1vygRtTjq/uQnFddE8vKUP3wndzMjzULNXlAZ90IeR7MBpsgZt1u5yDB2DWTrYnONarN/HAV0GDgsyrF/Eh4rxo5HTLAYSW5nAJBdg8r+nfsSF2oOy6Q60RGbUjqUb/nrKHKfYxySKqvl9vi4jXZV6/LZ8c3OTMFybRxPXttOUxZjisBqIbgiT8RjUL1hJzn502g1V7i7xfwsUVZzcyTkP6NLoFE5VBKgc2tgBUm6CtrbFRZ544Ud+K7IlUtI4vSF8fk6lW7pERNKUDf/kFo/fbkBVSfIBQM022EesyTrpIhuZoBXVzl65y6eaK+Wi9BnpaMHxio/idrH5MVOdeCEkc1vfOzPiJC/wWV1Y8iRv2tEkJpzo1isdb9FvyCau5aJ8vhfR0BpJ92/C0FxOaNqWWaEadm+xESSP+JqT52PFBM946oUgzmhLPZC8aOAER7xohjC2cF/pwbTgDRQllWqISGx8eunmFPQxO5ZGVqxQE+U2r177GGiGA/rZRO7l7Jq5imqcxEBP8g=----ATTACHMENT:----ODA5MDQxMTcxODc4NDY0IDM2MDAzNzY4MTY4NjE2OTEgODgyNTA1NjYzMDE5MjE5Mw==