Comments (7)
Use this
public function beforeFilter(Event $event)
{
$this->modelFactory('Endpoint', ['Muffin\Webservice\Model\EndpointRegistry', 'get']);
$this->loadModel('Articles', 'Endpoint');
}
I have tested it at a fresh installation of CakePhp 3.3.4
You have to add the line
$this->modelFactory('Endpoint', ['Muffin\Webservice\Model\EndpointRegistry', 'get']);
or you run into the initial described error in this issue.
May be the README.md should be updated.
from webservice.
Possible quick fix.
try using this:
$this->modelFactory('Endpoint', ['Muffin\Webservice\Model\EndpointRegistry', 'factory']);
I do not have enough details to check or try it. Hope this helps.
from webservice.
Thanks for the reply!
Unfortunately it shows the same error: "Argument 2 passed to Cake\Controller\Controller::modelFactory() must be callable, array given"
May be I did something wrong installing this package.
Please tell me what details you need. I can put the whole test project on the GitHub if it can help.
from webservice.
Which CakePhp Version do you use?
Have you added the plugin via composer require
?
Does your bootstrap.php
contain this line:
Plugin::load('Muffin/Webservice', ['bootstrap' => true]);
?
from webservice.
- CakePHP version is 3.3.4
- Yes. I have the plugin added via composer require
- Yes
from webservice.
Thank you! Problem solved.
from webservice.
Just hit this also myself. Perhaps the documentation needs updating to include this?
from webservice.
Related Issues (20)
- [cake 3.10, webservice 2.10] Wrong query result HOT 2
- CakePHP 5.x compatibility HOT 6
- Missing type casting HOT 1
- Empty custom Endpoint class is required to use non-generic Resource HOT 1
- BUILD_VALIDATOR_EVENT class constant HOT 1
- Trouble with Usage Example HOT 1
- RFC: 2.0.0 Roadmap HOT 11
- Error when i use cake 3.6 with debugkit HOT 4
- Complete testing for 2.0 release HOT 2
- Endpoint->getResourceClass() does not work correctly with custom Resource classes HOT 3
- Create, Update & Delete Examples HOT 12
- Edit object HOT 12
- Missing schema User or webservice Users describe implementation HOT 1
- Webservice twitter does not implement isQueryLoggingEnabled HOT 2
- Endpoint Default Connection Name 'App' HOT 7
- Embedded resources in api result HOT 1
- Endpoint returning an image HOT 1
- explode() expects parameter 2 to be string, null given HOT 1
- Method signature causing Fatal Error (cake-4.x)
- Support for CakePhp 4.x HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webservice.