kanshin / cakeentity Goto Github PK
View Code? Open in Web Editor NEWCakePHP model extension. With this plugin, your data is no longer just an array of data, but the real object. Works with CakePHP 1.3
CakePHP model extension. With this plugin, your data is no longer just an array of data, but the real object. Works with CakePHP 1.3
Works fine in
find('all', array('entity' => true ));
but dosent work with paginate
$this->Paginator->settings['entity'] = true;
$this->paginate();
josegonzalez has pointed at here.
One thing that is weird is when you have something like
Project hasMany Issue
$project = $this->Project->find('first', array(
'conditions' => array('Project.id' => 1),
'contain' => 'Issue',
));
If there are no issues for Project 1, then $project->issue exists (and it's empty), while $project->issues doesn't exist. The reverse occurs when there are issues in the resultset. I don't know the answer to this one, but I found it while looking at the codeblock in this commit.
array of data:
array(
'Model' => array(
'camelBack' => 'hoge'
)
)
will be:
Object(Entity) {
camel_back: 'hoge'
}
Why this converting is done?
I prefer name of attribute remaining "as is".
Hi,
are there any plans to make this great Behaviour compatible with CakePHP 2.0?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.