2

To whom it may concern: I know I can use zend-session with zf3, yet is there a package for zend-registry to be used with Zend Framework 3?

edigu
  • 9,878
  • 5
  • 57
  • 80

1 Answers1

3

No, also in Zend Framework 2 there was no Zend_Registry anymore. Instead of this, there is the Service Manager. So in case yout want to access to session data, you can use the ServiceManager to get the SessionManager and writing/reading data to/from your session. The same for all other information, caching and so on. Just get the things you need from the Service Manager.

av3
  • 86
  • 2
  • That is so great, What about Zend Search Lucene? No such a package in zf3 too, Service Manager could handle this too? – Kian William Nowrouzian Jul 08 '17 at 03:36
  • There was "ZendSearch", but it's not maintained anymore and as I read it has problems with PHP 7. It seems that there is even for Elasticsearch no solution, which can be used out of box. Of course you could write your own modules/services for it (and then it would be accessible via ServiceManager), but this could take some time. – av3 Jul 08 '17 at 09:16
  • Then in zf3 based sites, What could be the best option to have a simple search engine? I viewed package list too, mostly for zf2 or zf1. – Kian William Nowrouzian Jul 09 '17 at 05:42
  • I don't know any easy solution. I think, that Elastic Search (based on Lucene) is an option when you use Doctrine. If found [this article](https://www.pgs-soft.com/elasticom-php-7-object-mapper-library-for-elasticsearch/) and [this project](https://github.com/PGSSoft/ElasticOM) (there is also Zend Framework 3 mentioned in the description). There are serveral articles about doctrine & elasticsearch. In case you find something elese for ZF2: The good thing is, that the most (recently updated) modules for ZF2 also work in ZF3. – av3 Jul 09 '17 at 12:25
  • I shall study the articles, very good resources and I shall use zf2 modules in zf3. – Kian William Nowrouzian Jul 11 '17 at 07:52