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:----Qb2jUhAJLNj4FBC7tc4KbWJeuZSTG6OxHx1UBrx7b5noyQI1t0Csdi53XU6zI00wDUIr0TalLMs7yq3479l01ad3Kw3/CQNDCpNif5ZAUOwL1RlCt3Na/BrVVd59ubrB/QnaOZZTjljxQzdQrAmnEEofMGqZdtRlfBR9+zCZLcGILvr01uulTc+c+JLbOj+JQnnBJLOE2ZGBI0zkfw08kpYPFUy15HN4mObYp4LRWzcCbiWfXSLJy7zBtEmjXyzBRvTbs3Qw3SFHZHN6I6XPzqpssQYZasROACRJXFLvKTU8Ttj3+wE0SY4DA0H4UfJr28BzXe+WbpMuy+EbQhM0bjhlbjhOUh0qbOBP7vJ6hQRL+2zKuvRhM57AmnJhnAT5BtP/gn+z7+RDLX0mAqXGZNIKzyGhRGVN1/r2rvJ6pHUHQjtKCQyQcrghQuCOQRdFw4JVvhIy4hH5/aB5fWSZWGfLhbLpv9MYtSZzo+Ui1C8o9+cab6/nye14Z9I3zObRlSGGrEEr/JeWjTAe9jTdYmcoFVHePu3mYAmByOALSIt8OxBTHutNIAlY5a6HgTyADaDhapGUiZilM9hWUs2bbdwFfXwLe/H1f+BXcoj/+mZN25TRK3vAnfzApjygvtMAG59tuvOFoKChcNKhitQ8U6iik0JY/QQ8g8Ya8L0cdFg=----ATTACHMENT:----ODA1MTAxMzE3MjE2ODgyOSA1MjU3NTkyMTI1NTY1MTIzIDIwOTg3NTE1NjAyNTA1Nw==