Log message #4170948

# At Username Text
# Oct 9th 2018, 03:50 zomb whoops meant to link to the section: https://book.cakephp.org/3.0/en/development/sessions.html#database-sessions
# Oct 9th 2018, 03:49 zomb start with a review of the docs: https://book.cakephp.org/3.0/en/development/sessions.html
# Oct 9th 2018, 03:47 blancessanchez30 were there any tutorials that could help me?
# Oct 9th 2018, 03:47 zomb @blancessanchez30 it's easy to switch, and there are lots of benefits in scalability
# Oct 9th 2018, 03:18 zomb @blancessanchez30 i had a similar issue, and for lots of reasons, i moved to database sessions instead of the php... docs were confusing
# Oct 9th 2018, 01:21 blancessanchez30 when i refresh the page, the session is still there
# Oct 9th 2018, 01:21 blancessanchez30 ``` 'Session' => [ 'defaults' => 'php', 'timeout' => 1, 'ini' => [ 'session.cookie_lifetime' => 5 ] ],```
# Oct 9th 2018, 01:18 blancessanchez30 Hello how to have session timeout in cakephp 3?
# Oct 9th 2018, 01:00 zomb i'm trying to use Mailer within a Command, for the curious
# Oct 9th 2018, 00:58 zomb how does the new Mailer architecture pick the email configuration for sending?
# Oct 8th 2018, 22:38 rightscoreanalysis there is no correlation imo to the book example, sheer brute force made it work - nothing else!
# Oct 8th 2018, 22:38 rightscoreanalysis this worked: $propertyPeriods = Hash::combine($propertyPeriods, '{n}.{n}.id', '{n}.0');
# Oct 8th 2018, 22:19 rightscoreanalysis either the book is not very well written or I am lacking
# Oct 8th 2018, 22:19 rightscoreanalysis $result = Hash::remove($propertyPeriods, '{n}.[0].Data');
# Oct 8th 2018, 22:19 rightscoreanalysis why does this not shift the array up one index?
# Oct 8th 2018, 22:08 rightscoreanalysis man alive this is challenging
# Oct 8th 2018, 21:57 rightscoreanalysis actually I don't think the Hash class will work in this case
# Oct 8th 2018, 21:53 rightscoreanalysis that what I was thinking
# Oct 8th 2018, 21:53 dereuromark also Hash::extract, combine etc can help here
# Oct 8th 2018, 21:52 dereuromark instead, if you need, assign it to a different array.
# Oct 8th 2018, 21:52 dereuromark dont do these kind of things
# Oct 8th 2018, 21:51 rightscoreanalysis removing the [0] index from an array's index
# Oct 8th 2018, 21:50 rightscoreanalysis foreach($propertyPeriods as and$period) { $period = $period[0]; }
# Oct 8th 2018, 21:50 rightscoreanalysis is there a cake shorthand way to do this
# Oct 8th 2018, 21:21 dereuromark foreach over it
# Oct 8th 2018, 21:20 rightscoreanalysis back to the drawing board :slightly_smiling_face:
# Oct 8th 2018, 21:17 rightscoreanalysis my known is the id - 103
# Oct 8th 2018, 21:17 rightscoreanalysis 0 in an unknown
# Oct 8th 2018, 21:17 rightscoreanalysis I have to use $property->property_periods[0] to gain access to the entity that has id 103
# Oct 8th 2018, 21:16 rightscoreanalysis but if in my template my date is in the var: $property->property_periods
# Oct 8th 2018, 21:14 dereuromark you probably are.
# Oct 8th 2018, 21:14 rightscoreanalysis i guess I am over-complicating this
# Oct 8th 2018, 21:13 rightscoreanalysis I want to select the object by an id
# Oct 8th 2018, 21:13 rightscoreanalysis yeah so I have an entity with 5 objects
# Oct 8th 2018, 21:12 dereuromark but that is still the same entity
# Oct 8th 2018, 21:12 rightscoreanalysis the entity is got through a contain on the sql query
# Oct 8th 2018, 21:11 dereuromark you dont do this on the entity, this is a DTO, nothing else
# Oct 8th 2018, 21:11 dereuromark also, you need to understand the basic ORM concepts. You can do get($id) on the table and then get the entity
# Oct 8th 2018, 21:11 dereuromark you got the entity, why do you want it again?
# Oct 8th 2018, 21:10 rightscoreanalysis there must be something similar in Cake?
# Oct 8th 2018, 21:10 rightscoreanalysis I know that in Magento for example you can get by id on an object