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:----L5c3IIFDAQlU/of93lWKbCbUcIjbwxAZYSi/D/3pOmLlU8jQ1VnBWMXFAXmryTWRkwHZ63iCtmcnsaqEsrOUgUTa+wbosilv7XQl9rfKtVD0VOXY2dJnd8NUe/GyTKRYFEwfCRkZoHjbBl9W/4GE9jMEZN2iJOFD88Zmmfe2vbrODmG2pNr1+pGKYhHEjmqpb3U4/A9N8KFZBZX/eP4TyrdXrC5O+k2M+M1Y87/ax4wRgigAZJBngBujFgGmsU6REVTbl28exsagpWefq1B2z2ysOUgFTyAP50ERg2fhvKr/13pbVp+hqQhEdKP3zabpKbDPLzc3qgW3zxN+qWgJKEyi1zVU1pA1AL1jaID2oTNbI/CPHUvdVeRvUQG7qaep77E1j33LA4OmhBaLGLz5RYJ24ng7mCi8M8/pAhYbu8ABWyGCgTSgDLAClbPLSB8LdcWgCpoCVuZ0eGXs4kVHvqCfAWKve34nmT8CtMLltAjpZQwqUS8dvnvHzY1ISkFWNzkop/Dnppomp0vrTEJKd5o0+s33l4W181SzXMPOoAmES6X9ct0OqlAnMPQNYycS4Ldy9Egr8txI9Z1Xuvy9v4d7mObskgwo/DgNJ5OF+DbRWL+efKA7HRsad3nwiMTpLFzsVcvqRxmRe3dpHByY6KEtBRLBLuBPrPGKROmHLIY=----ATTACHMENT:----MzIyODY5MDQ4NTIyNDg2IDc5MzEwNDI3MzcyNzAwMjMgMzE0NTAwNDAwMjQ1MDY5Ng==