# |
Jun 25th 2018, 14:23 |
neon1024 |
https://en.wikipedia.org/wiki/Composition_over_inheritance |
# |
Jun 25th 2018, 14:23 |
neon1024 |
Composition over Inheritance. |
# |
Jun 25th 2018, 14:22 |
zmurphy |
It does in the resource class, but again, in that case it could have inherited entity and accomplished the same thing since it doesn't have a parent class |
# |
Jun 25th 2018, 14:22 |
neon1024 |
I did miss it |
# |
Jun 25th 2018, 14:22 |
neon1024 |
Ahok, https://github.com/UseMuffin/Webservice/blob/72f4e05aff632f9465ab5bb9a6ad653cf48f63b6/src/Model/Resource.php#L12 |
# |
Jun 25th 2018, 14:22 |
neon1024 |
Let me check, but I don’t recall seeing it |
# |
Jun 25th 2018, 14:21 |
hmic |
no? :/ |
# |
Jun 25th 2018, 14:21 |
neon1024 |
hmic, The Webservice plugin doesn’t use the EntityTrait though |
# |
Jun 25th 2018, 14:21 |
neon1024 |
I’d also imagine there is some BC support there |
# |
Jun 25th 2018, 14:20 |
hmic |
thats what i said, it's just not used in the core in multiple places. but check the webservice plugin e.g. |
# |
Jun 25th 2018, 14:20 |
neon1024 |
Which are not bound to the interface |
# |
Jun 25th 2018, 14:20 |
neon1024 |
Plus also allows objects which are not entities to use the methods |
# |
Jun 25th 2018, 14:20 |
neon1024 |
So perhaps it’s more about logical separation |
# |
Jun 25th 2018, 14:20 |
neon1024 |
As the entity trait are methods which manage the data in an entity |
# |
Jun 25th 2018, 14:19 |
neon1024 |
`\Cake\ORM\Entity` and `Cake\Datasource\EntityTrait` |
# |
Jun 25th 2018, 14:19 |
neon1024 |
It could be to do with the namespace? |
# |
Jun 25th 2018, 14:18 |
hmic |
:p |
# |
Jun 25th 2018, 14:18 |
hmic |
not interiting from entity |
# |
Jun 25th 2018, 14:18 |
zmurphy |
What would it be used for that couldn't be accomplished by inheriting from entity? |
# |
Jun 25th 2018, 14:15 |
hmic |
zmurphy: only because thats the only use in the core framework, does not mean there is nobody using it... |
# |
Jun 25th 2018, 14:09 |
zmurphy |
Why does entity trait exist if the only user is Entity? Were there some plans for it at some point? |
# |
Jun 25th 2018, 11:05 |
willem |
haha it works, i tried a bake model etc. and it is working great. will need some small modifications i guess. nice job! |
# |
Jun 25th 2018, 10:53 |
hmic |
thing is: you need to run on windows if you want to use sqlserver with (cake)php IMHO |
# |
Jun 25th 2018, 10:52 |
hmic |
willem: you can configure the ORM to work with your table structure, sure. |
# |
Jun 25th 2018, 10:42 |
willem |
What would be the way to set up a situation where i have an existing sqlserver database with tables that do not adhere to the cakephp conventions. I would like to use Cakes ORM to fetch and save data. Is this possible? |
# |
Jun 25th 2018, 10:37 |
neon1024 |
Or use your own event? |
# |
Jun 25th 2018, 10:29 |
unclezoot |
fair enough |
# |
Jun 25th 2018, 10:27 |
hmic |
same like validation errors get passed back e.g. |
# |
Jun 25th 2018, 10:27 |
hmic |
unclezoot, the entity |
# |
Jun 25th 2018, 10:24 |
unclezoot |
if you wanted to pass diagnostic messages back to the controller via ->afterSave(), where would be the place to do it? |
# |
Jun 25th 2018, 10:15 |
hmic |
;-) |
# |
Jun 25th 2018, 10:10 |
neon1024 |
Seems I have a allowMethod(‘get’) in a trait which was included in the controller |
# |
Jun 25th 2018, 10:06 |
neon1024 |
Ooh |
# |
Jun 25th 2018, 10:05 |
hmic |
might need to open a uk limited in the process to transfer my german company properties - while the uk is still in the eu ;-) |
# |
Jun 25th 2018, 10:05 |
hmic |
i'm trying to... kind of |
# |
Jun 25th 2018, 10:04 |
neon1024 |
Did you emigrate yet? |
# |
Jun 25th 2018, 10:04 |
neon1024 |
Oh moin hmic! |
# |
Jun 25th 2018, 10:04 |
hmic |
isn't the actual action method to late to allow, if it's forbidden by other means by default? |
# |
Jun 25th 2018, 10:01 |
josbeir |
:bomb: |
# |
Jun 25th 2018, 10:00 |
neon1024 |
Time to nuke the site from orbit. |
# |
Jun 25th 2018, 09:57 |
josbeir |
public function test() { $this->getRequest()->allowMethod('post'); die('hello world'); } |