Comments (3)
The reason I did this was to interface more easily with Opulence\Orm\Repositories\IRepository
. In a perfect world, PHP would have generics, and I could strong type the repository args/return types, eg:
interface IRepository<T>
{
public function add(T $entity) : void;
public function getById($id) : T;
// etc...
}
However, since it doesn't, this is essentially what I'm forced to do to make it easier to utilize the ORM for IUserRepository
.
from opulence.
Got the idea, just was a little bit confused when i saw IUser
was used but nowhere type declared, except it is declared in docblock.
from opulence.
I'm going to go ahead and close this if you don't mind.
from opulence.
Related Issues (20)
- Update components, tag version HOT 3
- unambiguous migration ordering during running migrations:down HOT 7
- Fixing phan issues HOT 4
- PSR-7 support HOT 4
- T_CLASS case in FileMigrationFinder.php appears to be broken HOT 1
- Deprecated annotations HOT 4
- Add support for using expressions in query builders HOT 1
- Package jeremeamia/superclosure is abandoned, you should avoid using it. Use opis/closure instead. HOT 1
- Remove deprecated method(s) for forward compatibiltiy HOT 3
- Improve `make:entity` and `make:datamapper` by inferring the database schema (tables/columns/relationships) automatically. HOT 4
- Migration HOT 3
- Not proper use of prepare statements in the sql repository example on documtentation page HOT 4
- Database relation support HOT 5
- Rewriting own SqlDataMapper classes HOT 4
- Fix bug that prevent non-HTTP_ and CONTENT_ headers from being sent in response
- Running `php apex app:runlocally` in Ubuntu does not work
- phpDocumentor problem HOT 12
- Spaces in Path cause passthru to fail for runlocally (possibly others) HOT 1
- Nice FW but too many dependency HOT 4
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 opulence.