joomla-framework / entities Goto Github PK
View Code? Open in Web Editor NEWJoomla Framework Support for Entities
License: GNU General Public License v2.0
Joomla Framework Support for Entities
License: GNU General Public License v2.0
When converting to DateTime or Carbon a null date, it will have an invalid date: "-0001-11-30 00:00:00.000000",
Now that the database API consistently uses (and requires) prepared statement support, this package should support that as well. To do a lookup by anything that's not a PK still requires manual quoting of all values.
// Current behavior
$data = (new MyModel)->where('name = ' . $db->quote($name))->get();
// Preferred behavior
$data = (new MyModel)->where('name', '=', $name);
// With this method prototype in the Query class
public function where(string $column, $value, string $operator = '=', string $glue = 'AND')
{
$paramName = ':' . $column;
$this->query->where($column . ' ' . $operator . ' ' . $paramName, $glue);
// TODO - Support defining the parameter type too, or at least detecting based on the $value param type?
$this->query->bind($paramName, $value);
return $this;
}
Deal with the fact that there can be recursion in models if properties depend on each other.
Proposed solution: Add maximum depth to loaded relations in a Model.
After we apply the alias we need to check if the key is a valid attribute and throw an exception if it's not
Maybe introduce the property of virtual properties to deal with the fact that there maybe properties we split up (e.g. in the CMS com_content's articletext)
To find a data item you need to call
$populatedModel = (new UserModel($this->db))->newQuery()->find($primaryKey);
which involves creating two model instances - which is kinda suboptimal :/
Composer cannot be set by default, since there is no stable version published
This repository is missing the usual GitHub templates.
I tested the json_decode functionality with wrong data in the database, but no error was thrown, instead, just null
was returned.
Either by caching setMutators or by whitelisting the virtual properties. Throw an exception if attribute(property) does not exist.
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.