I know that ruby ββ(on rails) uses a lot of βmagicβ, but I use PHP, is there any way to implement rails:
class Player < ActiveRecord::Base has_many :cards end
in PHP it will make so many peoples live a lot easier. Are there possibly / ORM frameworks that provide similar functionality, etc.?
The term you are looking for is "Object Relational Mapper" (ORM). The one you are quoting is a component of a Rails environment called ActiveRecord.
PHP ActiveRecord is one of the projects that is trying to provide this, although the latest version was in July 2010. I didnβt actually use it; I just switched to Rails. :)
in CakePHP there are relationships like hasMany, owned by Too, hasOne and hasAndBelongsToMany
PHP does not have an ORM in itself, but there are several fairly used ORM projects for it; I am familiar with Propel , and it is pretty good (used, for example, in the Symfony framework, which is a bit like Ruby).
Source: https://habr.com/ru/post/1346067/More articles:Number of rows Express Express GridView - c #the main difference between value types and reference types is pointersAbout using "use" and "final" to clean resources - .netGWT Junit ant warning: multiple ant versions found in path for junit - javaCreated a .pkg file in Xcode 4 and was unable to run it on my computer. - xcode4How do you get the physical disk number of a removable device from the drive letter in Windows 7? - windows-7Slow ApplicationSettingsBase - c #Enlarged streampos object - c ++Issue with inline assembly not matching source when debugging in IIS 7.5 - asp.netCreate Powershell Printer - powershellAll Articles