Questions tagged [laminas-api-tools]

Laminas API Tools provides both a builder and PHP runtime for HTTP APIs, using standards such as Problem Details for HTTP APIs, OAuth2, Hypertext Application Language, and others.

Laminas API Tools, formerly Apigility, provides both a builder and PHP runtime for HTTP APIs, using standards such as Problem Details for HTTP APIs, OAuth2, Hypertext Application Language, and others. It is built on top of , and is a subproject of the project.

251 questions
3
votes
2 answers

Adding events to Laminas

I am trying to add event for Laminas Framework that will fire when \Laminas\Mvc\MvcEvent::EVENT_DISPATCH is triggered. But absolutelly nothing happends, like this triggers not exists. What am I doing wrong? This is the code under the…
b4rt3kk
  • 1,419
  • 3
  • 17
  • 26
3
votes
0 answers

Is there an Apigility like server for Node.js?

Is there a Server like Apigility for Node.js code? I like the Apigility way of managing web services with: Versioning Swagger integration Team Work I miss that features especially when working together with Node.js developers.
notes-jj
  • 1,437
  • 1
  • 20
  • 33
3
votes
1 answer

zend framework 2: how to properly inject factory to controller to get different mapper classes?

I'm using Apigility, built on ZF2. Once request is dispatched to the controller's action, I need to choose proper adapter to hanle request - based on incomming parameters. Normally, Controller is instantiated by ControllerFactory, where you can…
Ivan
  • 315
  • 1
  • 3
  • 16
3
votes
2 answers

insert element on array on private function

How can insert element into final position of array this array is on a private function?? private function getData() { return array( 1 => array( 'open_cookie_id' => 1, 'text' => 'I may throw…
BlackHack123
  • 349
  • 1
  • 10
3
votes
1 answer

How to make Zf2 Apigilty accept client request with no Accept set in header

Recently I have upgraded my rest server to Zf2 Apigility, which the content negotiation settings are as follows, 'zf-content-negotiation' => array( 'controllers' => array( 'CloudSchoolBusFileApi\\V1\\Rest\\FileReceiver\\Controller' =>…
3
votes
1 answer

How to set up PHPUnit for an Apigility ZF2 application with multiple versions?

The phpunit.xml for a common ZF2 application with the common folders structure ... /phpunit /phpunit/phpunit.xml /module /module/Application /module/ModuleFoo /module/ModuleBar ... can be defined as follows:
automatix
  • 14,018
  • 26
  • 105
  • 230
3
votes
2 answers

How to register a custom hydrator in Zend Framework 2?

In an Apigility driven ZF2 application I want to use a custom Hydrator. Module class class Module implements ApigilityProviderInterface { ... public function getServiceConfig() { return array( 'factories' => array( …
automatix
  • 14,018
  • 26
  • 105
  • 230
3
votes
2 answers

The hydrator settings are ignored in Apigility

In Apigility it's possible to set a Hydrator for every Entity -- either over the Apigility UI or directly in the module.config.php, e.g.: return array( ... 'zf-hal' => array( 'metadata_map' => array( …
automatix
  • 14,018
  • 26
  • 105
  • 230
3
votes
1 answer

ZF2 apigility - How can we validate collections in json data

How can I get validated json value using Apigility. For example, I need to get validated user_id under users collection in the following json data. { "log_type": "split food", "meal_type": "Break Fast", "meal_date": "12-2-2015", …
3
votes
1 answer

(How) Can filters / parameters be used with a DB-connected service in Apigility?

As the Apigility documentation (REST Service Tutorial -> Create a REST Service -> [infobox] Code-Connected vs DB-Connected services) says, the built-in functionality for DB-connected services is "more of a rapid application development (RAD) or…
automatix
  • 14,018
  • 26
  • 105
  • 230
3
votes
2 answers

Doctrine - How to hydrate a collection when using query builder

A previous question I asked was to do with hydrating a result set when using Doctrine and query builder. My issue was how to return an array and their sub-sets: This was for a single result set and the answer was quite simple: $qb =…
HappyCoder
  • 5,985
  • 6
  • 42
  • 73
3
votes
1 answer

ZF2 Zend\Paginator\Adapter\DbSelect on DB2 i Series

Im creating a Zend APIgility application REST service and having a problem with my fetchAll Mapper function. I'm connecting to an IBM DB2 database running on an i Series server (AS/400) via DB2 Connect on a Windows Application Server. My Connection…
3
votes
2 answers

Nested Parameters/Values in POST Requests

I have been thinking about a good way to handle nested/complex values in POST requests to a apigility resource. For example, an order might contain a collection of order items in a single POST requested that is used to create an order. Both, order…
3
votes
2 answers

Apigility not save documentation fields

I have a problem with Apigility. When I will save the documentation of my REST service, only the field that describe the entire REST service is saved. I am trying save the response body, for instance, without success. Some things that I have…
3
votes
1 answer

How do I configure apigility to use Doctrine's MongoDB ODM?

I’m trying to use apigility with doctrine’s mongodb odm. I’ve set up my documents and configured the doctrine module as should. I’ve inserted (manually) one document to mongo, and defined a code-based rest service, with its “fetch” method (in the…
Doron
  • 3,176
  • 7
  • 35
  • 60
1
2
3
16 17