{"id":462680,"date":"2025-06-10T10:25:47","date_gmt":"2025-06-10T10:25:47","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=462680"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=462680","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u00ab\u0444\u0430\u0431\u0440\u0438\u043a\u0438\u00bb \u0432 \u0441\u0432\u043e\u0438\u0445 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u0445 \u0434\u043b\u044f Joomla<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0444\u0430\u0431\u0440\u0438\u043a \u0435\u0441\u0442\u044c \u0432 Joomla 5 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442?<\/h3>\n<ul>\n<li>\n<p><code><strong>Joomla\\CMS\\Cache\\CacheControllerFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u044d\u0448-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Categories\\CategoryFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Dispatcher\\ComponentDispatcherFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u0435\u0447\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Dispatcher\\ModuleDispatcherFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u0435\u0447\u0435\u0440 \u043c\u043e\u0434\u0443\u043b\u044f;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Document\\FactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Form\\FormFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Helper\\HelperFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0445\u0435\u043b\u043f\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Language\\LanguageFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Mail\\MailerFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Menu\\MenuFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0435\u043d\u044e;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\MVC\\Factory\\MVCFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Toolbar\\ToolbarFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0443\u043b\u0431\u0430\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\User\\UserFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e Id;<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Component\\Router\\RouterFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\Plugin\\Authentication\\Ldap\\Factory\\LdapFactory<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Ldap \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0431\u0440\u0438\u043a, \u043d\u043e \u0438\u0437 \u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0444\u0430\u0431\u0440\u0438\u043a &#8212; \u00ab\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u00bb.<\/p>\n<h3>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432?<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430-\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441\u043b\u0443\u0436\u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0421\u0434\u044d\u043a\u00a0\u2014 <code>CdekClientV2Factory<\/code>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0432 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c:<\/p>\n<pre><code class=\"php\">$apiClient = $this-&gt;getCdekClientV2Factory()-&gt;createDefaultClient();<\/code><\/pre>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432:<\/p>\n<h4>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0438:<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2FactoryInterface.php<\/code><\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use WishboxCdekSDK2\\CdekClientV2Interface; use function defined;  defined('_JEXEC') or die;  interface CdekClientV2FactoryInterface { public function createDefaultClient(): CdekClientV2Interface; }<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2Factory.php<\/code><\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use Joomla\\CMS\\Cache\\CacheControllerFactoryAwareTrait; use Joomla\\CMS\\Component\\ComponentHelper; use WishboxCdekSDK2\\CdekClientV2; use WishboxCdekSDK2\\CdekClientV2Interface;  class CdekClientV2Factory implements CdekClientV2FactoryInterface { use CacheControllerFactoryAwareTrait;  public function createDefaultClient(): CdekClientV2Interface { $componentParams = ComponentHelper::getParams('com_wishboxcdek');  $client = new CdekClientV2( $componentParams-&gt;get('account', ''), $componentParams-&gt;get('secure', ''), 60.0 );  $client-&gt;setCacheControllerFactory($this-&gt;getCacheControllerFactory());  return $client; } }<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438:<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Service\/Provider\/CdekClientV2Factory.php<\/code><\/p>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Service\\Provider;  use Joomla\\DI\\Container; use Joomla\\DI\\ServiceProviderInterface; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryInterface; use function defined;  defined('_JEXEC') or die;  class CdekClientV2Factory implements ServiceProviderInterface { public function register(Container $container): void { $container-&gt;set( CdekClientV2FactoryInterface::class, function (Container $container) { return new \\WishboxCdekSDK2\\Factory\\CdekClientV2Factory; } ); } } <\/code><\/pre>\n<h4>Aware-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2FactoryAwareInterface.php<\/code><\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0433\u0435\u0442\u0442\u0435\u0440 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u042d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u043e\u0439.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use function defined;  defined('_JEXEC') or die;  interface CdekClientV2FactoryAwareInterface { public function setCdekClientV2Factory(CdekClientV2FactoryInterface $cdekClientV2Factory): CdekClientV2FactoryAwareInterface;  public function getCdekClientV2Factory(): CdekClientV2FactoryInterface; } <\/code><\/pre>\n<h4>Aware-\u0442\u0440\u0435\u0439\u0442 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2FactoryAwareInterface.php<\/code><\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0433\u0435\u0442\u0442\u0435\u0440 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Aware-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use UnexpectedValueException; use function defined;  defined('_JEXEC') or die;  trait CdekClientV2FactoryAwareTrait { private ?CdekClientV2FactoryInterface $cdekClientV2Factory = null;  public function getCdekClientV2Factory(): CdekClientV2FactoryInterface { if (!$this-&gt;cdekClientV2Factory) { throw new UnexpectedValueException('CdekClientV2Factory not set in ' . __CLASS__); }  return $this-&gt;cdekClientV2Factory; }  public function setCdekClientV2Factory(CdekClientV2FactoryInterface $cdekClientV2Factory): CdekClientV2FactoryAwareInterface { $this-&gt;cdekClientV2Factory = $cdekClientV2Factory;  return $this; } } <\/code><\/pre>\n<h3>\u041a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h3>\n<h4>\u041f\u043b\u0430\u0433\u0438\u043d\u044b:<\/h4>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a \u043a\u043b\u0430\u0441\u0441\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Aware-\u0442\u0440\u0435\u0439\u0442 \u0444\u0430\u0431\u0440\u0438\u043a\u0438.<\/p>\n<p>\u0412 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <code>provider.php<\/code> \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0444\u0430\u0431\u0440\u0438\u043a\u0438: <code>\u0441\u0442\u0440\u043e\u043a\u0430: 17<\/code> \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u0430: <code>\u0441\u0442\u0440\u043e\u043a\u0430: 28<\/code>.<\/p>\n<pre><code class=\"php\">use Joomla\\CMS\\Extension\\PluginInterface; use Joomla\\CMS\\Factory; use Joomla\\CMS\\Plugin\\PluginHelper; use Joomla\\DI\\Container; use Joomla\\DI\\ServiceProviderInterface; use Joomla\\Event\\DispatcherInterface; use Joomla\\Plugin\\RadicalMart\\WishboxCdekPackageMultiple\\Extension\\WishboxCdekPackageMultiple; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryInterface; use WishboxCdekSDK2\\Service\\Provider\\CdekClientV2Factory;  defined('_JEXEC') or die;  return new class implements ServiceProviderInterface { public function register(Container $container): void { $container-&gt;registerServiceProvider(new CdekClientV2Factory);  $container-&gt;set( PluginInterface::class, function (Container $container) { $dispatcher = $container-&gt;get(DispatcherInterface::class); $config = (array) PluginHelper::getPlugin('radicalmart', 'wishboxcdekpackagemultiple');  $plugin = new WishboxCdekPackageMultiple($dispatcher, $config); $plugin-&gt;setApplication(Factory::getApplication()); $plugin-&gt;setCdekClientV2Factory($container-&gt;get(CdekClientV2FactoryInterface::class));  return $plugin; } ); } }; <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 <code>$this-&gt;getCdekClientV2Factory()<\/code>.<\/p>\n<h4>\u0412 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435<\/h4>\n<p>\u0412 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <code>provider.php<\/code> \u0438 \u043a\u043b\u0430\u0441\u0441\u0435-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0447\u0442\u043e \u0438 \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0435.<\/p>\n<h4>\u0412 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h4>\n<p>\u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0438, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0451 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432 <a href=\"https:\/\/habr.com\/ru\/posts\/895762\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0441\u0442\u0435<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e-\u0431\u044b MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u043c\u043e\u0433\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u043d\u0430 \u0441\u0430\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c \u0432\u043b\u0430\u0434\u0435\u0442\u044c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 <code>\u0441\u0442\u0440\u043e\u043a\u0430: 35<\/code> \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 <code>\u0441\u0442\u0440\u043e\u043a\u0430: 58<\/code>.<\/p>\n<pre><code class=\"php\">namespace Joomla\\Component\\WishboxCdek\\Administrator\\Extension\\Service\\Provider;  use Joomla\\CMS\\Cache\\CacheControllerFactoryInterface; use Joomla\\CMS\\Factory; use Joomla\\CMS\\Form\\FormFactoryInterface; use Joomla\\CMS\\Mail\\MailerFactoryInterface; use Joomla\\CMS\\MVC\\Factory\\ApiMVCFactory; use Joomla\\CMS\\MVC\\Factory\\MVCFactoryInterface; use Joomla\\CMS\\Router\\SiteRouter; use Joomla\\CMS\\User\\UserFactoryInterface; use Joomla\\Component\\WishboxCdek\\Administrator\\Factory\\RequestFactoryInterface; use Joomla\\Database\\DatabaseInterface; use Joomla\\DI\\Container; use Joomla\\DI\\ServiceProviderInterface; use Joomla\\Event\\DispatcherInterface; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryInterface; use WishboxCdekSDK2\\Service\\Provider\\CdekClientV2Factory; use function defined;  defined('_JEXEC') or die;  class MVCFactory extends \\Joomla\\CMS\\Extension\\Service\\Provider\\MVCFactory implements ServiceProviderInterface { private $namespace;  public function __construct(string $namespace) { parent::__construct($namespace);  $this-&gt;namespace = $namespace; }  public function register(Container $container): void { $container-&gt;registerServiceProvider(new CdekClientV2Factory); $container-&gt;registerServiceProvider(new RequestFactory);  $container-&gt;set( MVCFactoryInterface::class, function (Container $container) { if (Factory::getApplication()-&gt;isClient('api')) { $factory = new ApiMVCFactory($this-&gt;namespace); } else { $factory = new \\Joomla\\Component\\WishboxCdek\\Administrator\\MVC\\Factory\\MVCFactory($this-&gt;namespace); }  $factory-&gt;setFormFactory($container-&gt;get(FormFactoryInterface::class)); $factory-&gt;setDispatcher($container-&gt;get(DispatcherInterface::class)); $factory-&gt;setDatabase($container-&gt;get(DatabaseInterface::class)); $factory-&gt;setSiteRouter($container-&gt;get(SiteRouter::class)); $factory-&gt;setCacheControllerFactory($container-&gt;get(CacheControllerFactoryInterface::class)); $factory-&gt;setUserFactory($container-&gt;get(UserFactoryInterface::class)); $factory-&gt;setMailerFactory($container-&gt;get(MailerFactoryInterface::class)); $factory-&gt;setCdekClientV2Factory($container-&gt;get(CdekClientV2FactoryInterface::class)); $factory-&gt;setRequestFactory($container-&gt;get(RequestFactoryInterface::class));  return $factory; } ); } } <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0443 <code>createModel<\/code> MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0438. \u041f\u0435\u0440\u0435\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0435\u0440\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u044c\u044e aware-\u0438\u043d\u0442\u0435\u0440\u0435\u0444\u0435\u0439\u0441\u0430 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 <code>CdekClientV2FactoryAwareInterface<\/code> \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 <code>\u0441\u0442\u0440\u043e\u043a\u0438:190-200<\/code>.<\/p>\n<pre><code class=\"php\">namespace Joomla\\Component\\WishboxCdek\\Administrator\\MVC\\Factory;  use Exception; use Joomla\\CMS\\Cache\\CacheControllerFactoryAwareInterface; use Joomla\\CMS\\Cache\\CacheControllerFactoryAwareTrait; use Joomla\\CMS\\Factory; use Joomla\\CMS\\Form\\FormFactoryAwareInterface; use Joomla\\CMS\\Form\\FormFactoryAwareTrait; use Joomla\\CMS\\Mail\\MailerFactoryAwareInterface; use Joomla\\CMS\\Mail\\MailerFactoryAwareTrait; use Joomla\\CMS\\MVC\\Factory\\MVCFactoryInterface; use Joomla\\CMS\\MVC\\Model\\ModelInterface; use Joomla\\CMS\\Router\\SiteRouterAwareInterface; use Joomla\\CMS\\Router\\SiteRouterAwareTrait; use Joomla\\CMS\\User\\UserFactoryAwareInterface; use Joomla\\CMS\\User\\UserFactoryAwareTrait; use Joomla\\Component\\WishboxCdek\\Administrator\\Factory\\RequestFactoryAwareInterface; use Joomla\\Component\\WishboxCdek\\Administrator\\Factory\\RequestFactoryAwareTrait; use Joomla\\Database\\DatabaseAwareInterface; use Joomla\\Database\\DatabaseAwareTrait; use Joomla\\Database\\DatabaseInterface; use Joomla\\Database\\Exception\\DatabaseNotFoundException; use Joomla\\Event\\DispatcherAwareInterface; use Joomla\\Event\\DispatcherAwareTrait; use UnexpectedValueException; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryAwareInterface; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryAwareTrait; use function defined; use function sprintf;  defined('_JEXEC') or die;  class MVCFactory extends \\Joomla\\CMS\\MVC\\Factory\\MVCFactory implements MVCFactoryInterface, FormFactoryAwareInterface, SiteRouterAwareInterface, UserFactoryAwareInterface, MailerFactoryAwareInterface, CdekClientV2FactoryAwareInterface { use FormFactoryAwareTrait; use DispatcherAwareTrait; use DatabaseAwareTrait; use SiteRouterAwareTrait; use CacheControllerFactoryAwareTrait; use UserFactoryAwareTrait; use MailerFactoryAwareTrait; use CdekClientV2FactoryAwareTrait; use RequestFactoryAwareTrait;  public function createModel($name, $prefix = '', array $config = []) { \/\/ Clean the parameters $name   = preg_replace('\/[^A-Z0-9_]\/i', '', $name); $prefix = preg_replace('\/[^A-Z0-9_\\\\\\\\]\/i', '', $prefix);  if (!$prefix) { @trigger_error( sprintf( 'Calling %s() without a prefix is deprecated.', __METHOD__ ), E_USER_DEPRECATED );  $prefix = Factory::getApplication()-&gt;getName(); }  if (!mb_strpos($prefix, \"\\\\\")) { $className = $this-&gt;getClassName('Model\\\\' . ucfirst($name) . 'Model', $prefix); } else { $className = $this-&gt;getClassName(ucfirst($name) . 'Model', $prefix); }  if (!$className) { return null; }  $model = new $className($config, $this);  if ($model instanceof FormFactoryAwareInterface) { try { $model-&gt;setFormFactory($this-&gt;getFormFactory()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof DispatcherAwareInterface) { try { $model-&gt;setDispatcher($this-&gt;getDispatcher()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof DispatcherAwareInterface) { try { $model-&gt;setDispatcher($this-&gt;getDispatcher()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof SiteRouterAwareInterface) { try { $model-&gt;setSiteRouter($this-&gt;getSiteRouter()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof CacheControllerFactoryAwareInterface) { try { $model-&gt;setCacheControllerFactory($this-&gt;getCacheControllerFactory()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof CacheControllerFactoryAwareInterface) { try { $model-&gt;setCacheControllerFactory($this-&gt;getCacheControllerFactory()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof UserFactoryAwareInterface) { try { $model-&gt;setUserFactory($this-&gt;getUserFactory()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof MailerFactoryAwareInterface) { try { $model-&gt;setMailerFactory($this-&gt;getMailerFactory()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof DatabaseAwareInterface) { try { $model-&gt;setDatabase($this-&gt;getDatabase()); } catch (DatabaseNotFoundException $e) { @trigger_error('Database must be set, this will not be caught anymore in 5.0.', E_USER_DEPRECATED); $model-&gt;setDatabase(Factory::getContainer()-&gt;get(DatabaseInterface::class)); } }  if ($model instanceof CdekClientV2FactoryAwareInterface) { try { $model-&gt;setCdekClientV2Factory($this-&gt;getCdekClientV2Factory()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  if ($model instanceof RequestFactoryAwareInterface) { try { $model-&gt;setRequestFactory($this-&gt;getRequestFactory()); } catch (UnexpectedValueException $e) { \/\/ Ignore it } }  return $model; } } <\/code><\/pre>\n<h4>\u0412 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h4>\n<p>\u041a\u043b\u0430\u0441\u0441\u0430\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <code>CdekClientV2FactoryAwareInterface<\/code> \u0438 <code>CdekClientV2FactoryAwareTrait<\/code>.<\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e! \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0410\u041f\u0418-\u043a\u043b\u043c\u0435\u043d\u0442\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: <code>$apiCient = $this-&gt;getCdekClientV2Factory()-&gt;createDefaultClient();<\/code><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/906116\/\"> https:\/\/habr.com\/ru\/articles\/906116\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432 \u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0444\u0430\u0431\u0440\u0438\u043a \u0435\u0441\u0442\u044c \u0432 Joomla 5 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442?<\/h3>\n<ul>\n<li>\n<p><code><strong>Joomla\\CMS\\Cache\\CacheControllerFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u044d\u0448-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Categories\\CategoryFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Dispatcher\\ComponentDispatcherFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u0435\u0447\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Dispatcher\\ModuleDispatcherFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u0435\u0447\u0435\u0440 \u043c\u043e\u0434\u0443\u043b\u044f;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Document\\FactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Form\\FormFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u044b;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Helper\\HelperFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0445\u0435\u043b\u043f\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Language\\LanguageFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Mail\\MailerFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Menu\\MenuFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0435\u043d\u044e;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\MVC\\Factory\\MVCFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Toolbar\\ToolbarFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0443\u043b\u0431\u0430\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\User\\UserFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e Id;<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u043e \u0438\u043c\u0435\u043d\u0438;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\CMS\\Component\\Router\\RouterFactoryInterface<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430;<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code><strong>Joomla\\Plugin\\Authentication\\Ldap\\Factory\\LdapFactory<\/strong><\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Ldap \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0431\u0440\u0438\u043a, \u043d\u043e \u0438\u0437 \u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0444\u0430\u0431\u0440\u0438\u043a &#8212; \u00ab\u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u00bb.<\/p>\n<h3>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432?<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430-\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0434\u043b\u044f \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441\u043b\u0443\u0436\u0431\u044b \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0421\u0434\u044d\u043a\u00a0\u2014 <code>CdekClientV2Factory<\/code>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0432 \u043c\u043e\u0434\u0435\u043b\u044f\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c:<\/p>\n<pre><code class=\"php\">$apiClient = $this-&gt;getCdekClientV2Factory()-&gt;createDefaultClient();<\/code><\/pre>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441\u043e\u0432:<\/p>\n<h4>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0438:<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2FactoryInterface.php<\/code><\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use WishboxCdekSDK2\\CdekClientV2Interface; use function defined;  defined('_JEXEC') or die;  interface CdekClientV2FactoryInterface { public function createDefaultClient(): CdekClientV2Interface; }<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2Factory.php<\/code><\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0410\u041f\u0418-\u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use Joomla\\CMS\\Cache\\CacheControllerFactoryAwareTrait; use Joomla\\CMS\\Component\\ComponentHelper; use WishboxCdekSDK2\\CdekClientV2; use WishboxCdekSDK2\\CdekClientV2Interface;  class CdekClientV2Factory implements CdekClientV2FactoryInterface { use CacheControllerFactoryAwareTrait;  public function createDefaultClient(): CdekClientV2Interface { $componentParams = ComponentHelper::getParams('com_wishboxcdek');  $client = new CdekClientV2( $componentParams-&gt;get('account', ''), $componentParams-&gt;get('secure', ''), 60.0 );  $client-&gt;setCacheControllerFactory($this-&gt;getCacheControllerFactory());  return $client; } }<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438:<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Service\/Provider\/CdekClientV2Factory.php<\/code><\/p>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Service\\Provider;  use Joomla\\DI\\Container; use Joomla\\DI\\ServiceProviderInterface; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryInterface; use function defined;  defined('_JEXEC') or die;  class CdekClientV2Factory implements ServiceProviderInterface { public function register(Container $container): void { $container-&gt;set( CdekClientV2FactoryInterface::class, function (Container $container) { return new \\WishboxCdekSDK2\\Factory\\CdekClientV2Factory; } ); } } <\/code><\/pre>\n<h4>Aware-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2FactoryAwareInterface.php<\/code><\/p>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0433\u0435\u0442\u0442\u0435\u0440 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u042d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u043e\u0439.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use function defined;  defined('_JEXEC') or die;  interface CdekClientV2FactoryAwareInterface { public function setCdekClientV2Factory(CdekClientV2FactoryInterface $cdekClientV2Factory): CdekClientV2FactoryAwareInterface;  public function getCdekClientV2Factory(): CdekClientV2FactoryInterface; } <\/code><\/pre>\n<h4>Aware-\u0442\u0440\u0435\u0439\u0442 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h4>\n<p><code>Root\/libraries\/wishboxcdek\/src\/Factory\/CdekClientV2FactoryAwareInterface.php<\/code><\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0433\u0435\u0442\u0442\u0435\u0440 \u0438 \u0441\u0435\u0442\u0442\u0435\u0440 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 Aware-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<pre><code class=\"php\">namespace WishboxCdekSDK2\\Factory;  use UnexpectedValueException; use function defined;  defined('_JEXEC') or die;  trait CdekClientV2FactoryAwareTrait { private ?CdekClientV2FactoryInterface $cdekClientV2Factory = null;  public function getCdekClientV2Factory(): CdekClientV2FactoryInterface { if (!$this-&gt;cdekClientV2Factory) { throw new UnexpectedValueException('CdekClientV2Factory not set in ' . __CLASS__); }  return $this-&gt;cdekClientV2Factory; }  public function setCdekClientV2Factory(CdekClientV2FactoryInterface $cdekClientV2Factory): CdekClientV2FactoryAwareInterface { $this-&gt;cdekClientV2Factory = $cdekClientV2Factory;  return $this; } } <\/code><\/pre>\n<h3>\u041a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/h3>\n<h4>\u041f\u043b\u0430\u0433\u0438\u043d\u044b:<\/h4>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a \u043a\u043b\u0430\u0441\u0441\u0443 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Aware-\u0442\u0440\u0435\u0439\u0442 \u0444\u0430\u0431\u0440\u0438\u043a\u0438.<\/p>\n<p>\u0412 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 <code>provider.php<\/code> \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0444\u0430\u0431\u0440\u0438\u043a\u0438: <code>\u0441\u0442\u0440\u043e\u043a\u0430: 17<\/code> \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u043b\u0430\u0433\u0438\u043d\u0430: <code>\u0441\u0442\u0440\u043e\u043a\u0430: 28<\/code>.<\/p>\n<pre><code class=\"php\">use Joomla\\CMS\\Extension\\PluginInterface; use Joomla\\CMS\\Factory; use Joomla\\CMS\\Plugin\\PluginHelper; use Joomla\\DI\\Container; use Joomla\\DI\\ServiceProviderInterface; use Joomla\\Event\\DispatcherInterface; use Joomla\\Plugin\\RadicalMart\\WishboxCdekPackageMultiple\\Extension\\WishboxCdekPackageMultiple; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryInterface; use WishboxCdekSDK2\\Service\\Provider\\CdekClientV2Factory;  defined('_JEXEC') or die;  return new class implements ServiceProviderInterface { public function register(Container $container): void { $container-&gt;registerServiceProvider(new CdekClientV2Factory);  $container-&gt;set( PluginInterface::class, function (Container $container) { $dispatcher = $container-&gt;get(DispatcherInterface::class); $config = (array) PluginHelper::getPlugin('radicalmart', 'wishboxcdekpackagemultiple');  $plugin = new WishboxCdekPackageMultiple($dispatcher, $config); $plugin-&gt;setApplication(Factory::getApplication()); $plugin-&gt;setCdekClientV2Factory($container-&gt;get(CdekClientV2FactoryInterface::class));  return $plugin; } ); } }; <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 <code>$this-&gt;getCdekClientV2Factory()<\/code>.<\/p>\n<h4>\u0412 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435<\/h4>\n<p>\u0412 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 <code>provider.php<\/code> \u0438 \u043a\u043b\u0430\u0441\u0441\u0435-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0447\u0442\u043e \u0438 \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0435.<\/p>\n<h4>\u0412 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430<\/h4>\n<p>\u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0438, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0451 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432 <a href=\"https:\/\/habr.com\/ru\/posts\/895762\/\" rel=\"noopener noreferrer nofollow\">\u043f\u043e\u0441\u0442\u0435<\/a>.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e-\u0431\u044b MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u043c\u043e\u0433\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u043d\u0430 \u0441\u0430\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c \u0432\u043b\u0430\u0434\u0435\u0442\u044c.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0438\u0441-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 <code>\u0441\u0442\u0440\u043e\u043a\u0430: 35<\/code> \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 <code>\u0441\u0442\u0440\u043e\u043a\u0430: 58<\/code>.<\/p>\n<pre><code class=\"php\">namespace Joomla\\Component\\WishboxCdek\\Administrator\\Extension\\Service\\Provider;  use Joomla\\CMS\\Cache\\CacheControllerFactoryInterface; use Joomla\\CMS\\Factory; use Joomla\\CMS\\Form\\FormFactoryInterface; use Joomla\\CMS\\Mail\\MailerFactoryInterface; use Joomla\\CMS\\MVC\\Factory\\ApiMVCFactory; use Joomla\\CMS\\MVC\\Factory\\MVCFactoryInterface; use Joomla\\CMS\\Router\\SiteRouter; use Joomla\\CMS\\User\\UserFactoryInterface; use Joomla\\Component\\WishboxCdek\\Administrator\\Factory\\RequestFactoryInterface; use Joomla\\Database\\DatabaseInterface; use Joomla\\DI\\Container; use Joomla\\DI\\ServiceProviderInterface; use Joomla\\Event\\DispatcherInterface; use WishboxCdekSDK2\\Factory\\CdekClientV2FactoryInterface; use WishboxCdekSDK2\\Service\\Provider\\CdekClientV2Factory; use function defined;  defined('_JEXEC') or die;  class MVCFactory extends \\Joomla\\CMS\\Extension\\Service\\Provider\\MVCFactory implements ServiceProviderInterface { private $namespace;  public function __construct(string $namespace) { parent::__construct($namespace);  $this-&gt;namespace = $namespace; }  public function register(Container $container): void { $container-&gt;registerServiceProvider(new CdekClientV2Factory); $container-&gt;registerServiceProvider(new RequestFactory);  $container-&gt;set( MVCFactoryInterface::class, function (Container $container) { if (Factory::getApplication()-&gt;isClient('api')) { $factory = new ApiMVCFactory($this-&gt;namespace); } else { $factory = new \\Joomla\\Component\\WishboxCdek\\Administrator\\MVC\\Factory\\MVCFactory($this-&gt;namespace); }  $factory-&gt;setFormFactory($container-&gt;get(FormFactoryInterface::class)); $factory-&gt;setDispatcher($container-&gt;get(DispatcherInterface::class)); $factory-&gt;setDatabase($container-&gt;get(DatabaseInterface::class)); $factory-&gt;setSiteRouter($container-&gt;get(SiteRouter::class)); $factory-&gt;setCacheControllerFactory($container-&gt;get(CacheControllerFactoryInterface::class)); $factory-&gt;setUserFactory($container-&gt;get(UserFactoryInterface::class)); $factory-&gt;setMailerFactory($container-&gt;get(MailerFactoryInterface::class)); $factory-&gt;setCdekClientV2Factory($container-&gt;get(CdekClientV2FactoryInterface::class)); $factory-&gt;setRequestFactory($container-&gt;get(RequestFactoryInterface::class));  return $factory; } ); } } <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u0432 \u043c\u0435\u0442\u043e\u0434\u0443 <code>createModel<\/code> MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0438. \u041f\u0435\u0440\u0435\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 MVC-\u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0435\u0440\u0438\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u044c\u044e aware-\u0438\u043d\u0442\u0435\u0440\u0435\u0444\u0435\u0439\u0441\u0430 \u043d\u0430\u0448\u0435\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 <code>CdekClientV2FactoryAwareInterface<\/code> \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 <code>\u0441\u0442\u0440\u043e\u043a\u0438:190-200<\/code>.<\/p>\n<pre><code class=\"php\">namespace Joomla\\Component\\WishboxCdek\\Administrator\\MVC\\Factory;  use Exception; use Joomla\\CMS\\Cache\\CacheControllerFactoryAwareInterface; use Joomla\\CMS\\Cache\\CacheControllerFactoryAwareTrait; use Joomla\\CMS\\Factory; use Joomla\\CMS\\Form\\FormFactoryAwareInterface; use Joomla\\CMS\\Form\\FormFactoryAwareTrait; use Joomla\\CMS\\Mail\\MailerFactoryAwareInterface; use <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-462680","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/462680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=462680"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/462680\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=462680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=462680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=462680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}