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:----p1Fdlghc+HKNaU1R1JnpZEP0hjreSd78s3GFU2IwruIyX20BVvU4zeT5xfMK/yoTu1bi/78EcVsUm82ta/IZgbHfGPXsFY8CzahY4NuypOUdG7Ifst/9LWUhxrmn5GwtkoMrlchl417XBkwoCF7SGRyBY3tn6yWreYgSxpXbPR6BiQ9HN3XrfNYkSxRA5KqNtaA6DTDQTSlSXnNKeZTFIGkkU9eRB269cYDdVRPKt8+arlru4SLGc8VVkxIbeZt2nwgfaRCio0/EpJxL0nTd17QrZ0SQgq1ae9/sOWrW08US68Zb/VAhpMMdH7WVL26zdVhTBctLfpW/4BXJA7JD2UCQP4gBjd4RmHvsceIrH0nbcU/vQp/3UW1Ot3qyjDU44q9KSKiZEq4LKlPB9Pjyp++uD4BCgiyG39GT7QCmJUh80//N/iADwqmE1kZcQkaWDzO5tKDEj0VS1Itlj8f4gXOrdqUfyWuG8R0srE+oHmdj4PiCCIQmlwPTAgd6bFPr2YqThzMAGhGZUdJKKLbF9NJ485AO2ReAX6BgjOeUK3hNYYya2YMqzstjuZ0RzHT6ECWyPSQmxk+IFmnbx8k6jZM8OyH6UUWYs6BacZRCGS4u6J+I4LZq9mlH+bO+c8MOBuPFzGRvy61sSwk3u0wndCsXruA0TGsP+vjAr82MPCM=----ATTACHMENT:----MTQyMDMyMzE2ODMxOTUwNyA2MDEzMDM3OTMzOTkzMjE5IDk0MTg3NTU1MDE0Mjk1MzM=