B
    è¹`y  ã               @   s   d dl mZ G dd„ dƒZdS )é    )Úget_current_registryc               @   s   e Zd Zdd„ Zdd„ ZdS )ÚZCAConfiguratorMixinc             C   s   ddl m} | t¡ dS )aŸ  Call :func:`zope.component.getSiteManager.sethook` with the
        argument :data:`pyramid.threadlocal.get_current_registry`, causing
        the :term:`Zope Component Architecture` 'global' APIs such as
        :func:`zope.component.getSiteManager`,
        :func:`zope.component.getAdapter` and others to use the
        :app:`Pyramid` :term:`application registry` rather than the Zope
        'global' registry.r   )ÚgetSiteManagerN)Úzope.componentr   Zsethookr   )Úselfr   © r   úZ/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/pyramid/config/zca.pyÚhook_zca   s    zZCAConfiguratorMixin.hook_zcac             C   s   ddl m} | ¡  dS )z|Call :func:`zope.component.getSiteManager.reset` to undo the
        action of :meth:`pyramid.config.Configurator.hook_zca`.r   )r   N)r   r   Úreset)r   r   r   r   r   Ú
unhook_zca   s    zZCAConfiguratorMixin.unhook_zcaN)Ú__name__Ú
__module__Ú__qualname__r	   r   r   r   r   r   r      s   r   N)Zpyramid.threadlocalr   r   r   r   r   r   Ú<module>   s   