Zend_Auth: why authenticate an object named adapter, not a strategy?

$Zend_auth->authenticate($adapter);

Why is it called an adapter and not a strategy?

+3
source share
1 answer

Good question ken. I would agree that the Zend_Auth_Adapter component is a good representation of the strategy template. One could argue that he is also a candidate for an adapter template. It serves as an adapter for any authentication mechanism that you use, which may be a different class (which makes it a more obvious adapter), but even for something like authentication using credentials stored in the database, it serves in as a simple English adapter to your primary credential store.

, Zend Framework . Xxx_Singleton, Xxx_Strategy Xxx_Builder, , . , Xxx_Decorator.

, proposal . ZF , . , , , Zend_Auth_Adapter.

+7

Source: https://habr.com/ru/post/1713588/


All Articles