# |
Jun 25th 2018, 20:47 |
andre |
no I dont need s |
# |
Jun 25th 2018, 20:47 |
andre |
d/m/Y H:i:s |
# |
Jun 25th 2018, 20:47 |
andre |
ops |
# |
Jun 25th 2018, 20:46 |
saeideng |
are you sure `'d/m/Y M:i:s` is tru ? |
# |
Jun 25th 2018, 20:43 |
itmpls |
should it be H:i:s ? and 19:50:00 ? |
# |
Jun 25th 2018, 20:43 |
itmpls |
M:i:s -> 19:50 , wheres the third segment? |
# |
Jun 25th 2018, 20:42 |
itmpls |
no? |
# |
Jun 25th 2018, 20:42 |
itmpls |
you need the seconds |
# |
Jun 25th 2018, 20:37 |
andre |
the separation symbol could not be found |
# |
Jun 25th 2018, 20:36 |
andre |
It returns |
# |
Jun 25th 2018, 20:36 |
andre |
Or tryng again changing a little my code |
# |
Jun 25th 2018, 20:34 |
andre |
I'm trying to get a specific date (string) and convert to Chronos object, I'm trying to do this way : $ata = Chronos::createFromFormat('d/m/Y M:i:s', $date, 'America/Sao_Paulo'); where $date is "10/05/2019 19:50" but cake gives me this error The separation symbol could not be found instead creating the object. Does anyone know what am I doing wrong? |
# |
Jun 25th 2018, 20:32 |
andre |
Hello guys I need help |
# |
Jun 25th 2018, 18:04 |
mikesmoniker |
File uploaded https://cakesf.slack.com/files/U67NZSL1G/FBD0J1CTS/dat_s_whack_tho.php / https://slack-files.com/T053DPNCM-FBD0J1CTS-6de640f764 - something to do with one method being from Zend\Diactoros\MessageTrait and the other being from Cake\Http\Response? |
# |
Jun 25th 2018, 17:42 |
mikesmoniker |
Other things stick (status code, different headers, etc.) but Content-Type doesn’t. |
# |
Jun 25th 2018, 17:41 |
mikesmoniker |
Any ideas why when I do something like `$this->response = $this->response->withHeader()` and _do not_ return anything from my action it works, but if I subsequently `return $this->response` or just `return $this->response->withHeader()` the header doesn’t take? |
# |
Jun 25th 2018, 16:52 |
hmic |
if you don't add ->select(...) to your query, it's even the default... |
# |
Jun 25th 2018, 16:48 |
camden |
ah ok. Thanks, I didn't know you could just do that. |
# |
Jun 25th 2018, 16:44 |
hmic |
:P |
# |
Jun 25th 2018, 16:44 |
hmic |
or even table.* |
# |
Jun 25th 2018, 16:43 |
hmic |
just select * |
# |
Jun 25th 2018, 16:41 |
camden |
Generally we would need to pull all the fields for the record, and there are several fields that have characters that aren't allowed in them. So it would make the code easier to read if I didn't have to include all the field names. If that's not easily done then manually quoting the field names might be my only option. |
# |
Jun 25th 2018, 16:38 |
hmic |
yes. that is what it does |
# |
Jun 25th 2018, 16:37 |
camden |
I did see someone mention that as an option. That basically means you just quote the field names like so $query->select('`field-name`'), correct? |
# |
Jun 25th 2018, 16:32 |
hmic |
camden, why not just quote the query in question yourself then? |
# |
Jun 25th 2018, 16:11 |
camden |
Hello everyone, Is there a way to enable identifier quoting for a single query? I've tried researching it but the method I found doesn't seem to work. |
# |
Jun 25th 2018, 14:58 |
birdy247 |
long time |
# |
Jun 25th 2018, 14:58 |
birdy247 |
hmic :slightly_smiling_face: |
# |
Jun 25th 2018, 14:24 |
mikesmoniker |
IIRC we use `EntityTrait` in some model-esq classes that aren’t regular Cake entities. I don’t have the details on why, exactly, but it seemed to work out well. |
# |
Jun 25th 2018, 14:23 |
neon1024 |
Or ask on the forums? |
# |
Jun 25th 2018, 14:23 |
hmic |
zmurphy: you could refactor it and open a pr, lets see what the comments are :p |
# |
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. |