# |
Jul 3rd 2017, 09:57 |
savant |
juststeveking: and what issues are you having? |
# |
Jul 3rd 2017, 09:55 |
juststeveking |
Can anybody give advise on a cake 2 project ? I want to try and write my own middleware class that is basically an audit trail of who is going where and what they are viewing |
# |
Jul 3rd 2017, 09:52 |
jonasz |
thx @dakota , i'm going to try this one ;) |
# |
Jul 3rd 2017, 09:47 |
dakota |
Convert the result into a iso string using `toIso8601String` and use that |
# |
Jul 3rd 2017, 09:36 |
jonasz |
but still cakes results returns the object where 'timezone' => 'UTC', i cannot rectify this with constructor..hmm |
# |
Jul 3rd 2017, 09:35 |
jonasz |
i'm trying to do it through assertArraySubset with sth like FrozenTime::createFromTimestampUTC( strtotime('2016-10-05 14:18:42') ) |
# |
Jul 3rd 2017, 09:34 |
jonasz |
Hi Guys, could you tell me how you are comparing FrozenTime instances in unit tests? I mean in the results from DB query, where you get FrozenTime rather than datetime string? |
# |
Jul 3rd 2017, 09:32 |
birdy247 |
Proffer or upload plugin |
# |
Jul 3rd 2017, 09:32 |
birdy247 |
who we gona call? |
# |
Jul 3rd 2017, 09:32 |
birdy247 |
We are kicking off a new project and need file upload |
# |
Jul 3rd 2017, 09:30 |
birdy247 |
Morning neon1024 |
# |
Jul 3rd 2017, 08:57 |
kris |
Morning :slightly_smiling_face: |
# |
Jul 3rd 2017, 08:53 |
pidlo |
in europe we have 11:00 :) |
# |
Jul 3rd 2017, 08:52 |
pidlo |
many tahnks if i comment constructor then pass parametes in initialize... many thanks.. |
# |
Jul 3rd 2017, 08:51 |
neon1024 |
Morning everyone |
# |
Jul 3rd 2017, 08:48 |
savant |
When you call `loadComponent`, the options array is passed to the initialize() method. remove the `__construct` method completely, as you are removing the internal logic that makes a component work. |
# |
Jul 3rd 2017, 08:48 |
savant |
You *dont* get an instance of a controller. It is loaded as a property of the controller. |
# |
Jul 3rd 2017, 08:47 |
pidlo |
savant and how can i get instance? i call loadComponent... but i cannot pass parameters in constuctor or in initialiye method.... |
# |
Jul 3rd 2017, 08:19 |
savant |
it loads it as a property of the class |
# |
Jul 3rd 2017, 08:19 |
savant |
you dont get an instance of the SearchComp |
# |
Jul 3rd 2017, 08:19 |
pidlo |
savant ..https://gist.github.com/anonymous/f34b096e645db4f64ca1f3c5a5112485 |
# |
Jul 3rd 2017, 08:18 |
birdy247 |
Thanks |
# |
Jul 3rd 2017, 08:18 |
birdy247 |
:slightly_smiling_face: |
# |
Jul 3rd 2017, 08:17 |
savant |
sure |
# |
Jul 3rd 2017, 08:16 |
birdy247 |
It works but is it advisable? |
# |
Jul 3rd 2017, 08:15 |
savant |
sure |
# |
Jul 3rd 2017, 08:14 |
birdy247 |
Session?? |
# |
Jul 3rd 2017, 08:14 |
birdy247 |
If its on a per user basis, it would be in the DB somewhere |
# |
Jul 3rd 2017, 08:13 |
savant |
`$GLOBALS`? |
# |
Jul 3rd 2017, 08:13 |
birdy247 |
Thats the bit I cant get my head around |
# |
Jul 3rd 2017, 08:12 |
savant |
you’re probably going to want to set the SOURCE and TARGET some other way |
# |
Jul 3rd 2017, 08:12 |
birdy247 |
presumably I would have to do this somewhere else in the app? |
# |
Jul 3rd 2017, 08:12 |
birdy247 |
What If I let every user specify their timezone |
# |
Jul 3rd 2017, 08:11 |
savant |
just whenever it maps to the incoming data |
# |
Jul 3rd 2017, 08:11 |
birdy247 |
So does this always assuem that every user is inputting in the same timezone? |
# |
Jul 3rd 2017, 08:11 |
birdy247 |
But this works on contstants |
# |
Jul 3rd 2017, 08:10 |
birdy247 |
to use the date_default_timezone_set |
# |
Jul 3rd 2017, 08:10 |
birdy247 |
I have modified it |
# |
Jul 3rd 2017, 08:09 |
savant |
sure |
# |
Jul 3rd 2017, 08:09 |
birdy247 |
https://github.com/davidyell/TimezoneAwareDateTime/blob/master/src/Database/Type/TimezoneAwareDateTime.php |
# |
Jul 3rd 2017, 08:08 |
birdy247 |
Is this still the "best" method in cake |