# |
Aug 6th 2008, 22:34 |
stabb |
oh hey |
# |
Aug 6th 2008, 22:30 |
cobol |
does that make sense? |
# |
Aug 6th 2008, 22:30 |
cobol |
that makes everything automagic, for the most part |
# |
Aug 6th 2008, 22:30 |
cobol |
so it's a naming convention aided by camelcasing |
# |
Aug 6th 2008, 22:30 |
cobol |
i.e. to store objects of type 'Food', you create a table called 'Foods' with a controller called 'Foods Controller', and you can access related objects called food 'Bins' by having a key named 'bin_id' |
# |
Aug 6th 2008, 22:29 |
moelee |
well that's just one example |
# |
Aug 6th 2008, 22:29 |
moelee |
to make connections between tables and models |
# |
Aug 6th 2008, 22:29 |
cobol |
poluta1: it basically means that you dont need to explicitly state things because there is a standard way of expressin them already |
# |
Aug 6th 2008, 22:29 |
moelee |
cakephp relies on naming conventions |
# |
Aug 6th 2008, 22:29 |
moelee |
umm |
# |
Aug 6th 2008, 22:28 |
Hedz |
so you dont need to configure it... its convention |
# |
Aug 6th 2008, 22:28 |
Hedz |
all table names must be plural |
# |
Aug 6th 2008, 22:28 |
Hedz |
example of convetions is tables names |
# |
Aug 6th 2008, 22:28 |
poluta1 |
can somebody explain to me..? what is convention over configuration ? owwhh... silly question.. :( sorry |
# |
Aug 6th 2008, 22:21 |
Jezek |
how can i cache an array |
# |
Aug 6th 2008, 22:15 |
cobol |
good programmers always are |
# |
Aug 6th 2008, 22:15 |
nymacro |
I'm like that. You know. Lazy |
# |
Aug 6th 2008, 22:14 |
nymacro |
It isn't really a problem. Was just interested if there was a better way to do it :P |
# |
Aug 6th 2008, 22:14 |
nymacro |
lol |
# |
Aug 6th 2008, 22:14 |
cobol |
;) |
# |
Aug 6th 2008, 22:14 |
cobol |
shut it :P |
# |
Aug 6th 2008, 22:14 |
cobol |
seriously |
# |
Aug 6th 2008, 22:14 |
cobol |
if thats the biggest problem you're having |
# |
Aug 6th 2008, 22:14 |
nymacro |
Oh well |
# |
Aug 6th 2008, 22:14 |
cobol |
it would break saves |
# |
Aug 6th 2008, 22:14 |
nymacro |
that way when you iterate over $array['Post'] it would have the same behaviour |
# |
Aug 6th 2008, 22:14 |
cobol |
that would violate convention, actually |
# |
Aug 6th 2008, 22:13 |
cobol |
nah |
# |
Aug 6th 2008, 22:13 |
nymacro |
(something which would make it consistently $array['Post'][index]['Post]['id']) |
# |
Aug 6th 2008, 22:13 |
nymacro |
Was just wondering if there were a better way |
# |
Aug 6th 2008, 22:13 |
nymacro |
yeah |
# |
Aug 6th 2008, 22:12 |
cobol |
if it has sub-children, change behavior, or vice versa |
# |
Aug 6th 2008, 22:12 |
cobol |
i'd just run checks on the data array |
# |
Aug 6th 2008, 22:12 |
nymacro |
no worries |
# |
Aug 6th 2008, 22:12 |
cobol |
sorry, it took me a while to get your problem |
# |
Aug 6th 2008, 22:12 |
cobol |
the nesting behavior is explicit to support the automatic relationships |
# |
Aug 6th 2008, 22:12 |
cobol |
really only with a custom query, from what i know |
# |
Aug 6th 2008, 22:11 |
nymacro |
Just wondering if there is a way to make it keep the same form |
# |
Aug 6th 2008, 22:11 |
nymacro |
basically, from one place, i use $post['id'], and another it is $post['Post']['id'] |
# |
Aug 6th 2008, 22:11 |
nymacro |
post element: http://bin.cakephp.org/view/65675558 |
# |
Aug 6th 2008, 22:10 |
nymacro |
*element |