Просмотр поста

.
AlkatraZ
╭∩╮ (`-`) ╭∩╮
# Devendraoli (28.01.2017 / 05:23)
how can i setup my class to work with zend service manager
copied files to system/johncms/

Added
namespace Johncms;
use Interop\Container\ContainerInterface;

I want to use like $myclass = $co
You must create a factory (invocable class)
https://github.com/john-cms/jo ... y.php
A factory initializes your desired class.
https://github.com/john-cms/jo ... p#L20
https://github.com/john-cms/jo ... g.php

Theen you need to register your factory on the configuration (file) -> dependencies -> factories:
https://github.com/john-cms/jo ... hp#L8