# |
Dec 1st 2017, 13:48 |
casmo |
Cake, for example, force you to separate that logic |
# |
Dec 1st 2017, 13:48 |
casmo |
Sounds harsh, but it is already really good seperated |
# |
Dec 1st 2017, 13:48 |
AlexMax |
plus it's safer (not having to remember to h() every single variable) |
# |
Dec 1st 2017, 13:48 |
casmo |
If you need that enforcement I'm not sure you are the right guy for the job |
# |
Dec 1st 2017, 13:47 |
AlexMax |
plus it's slightly nicer to look at |
# |
Dec 1st 2017, 13:47 |
AlexMax |
casmo: eh, it helps you enforce separation of template and logic |
# |
Dec 1st 2017, 13:47 |
dereuromark |
dont=down |
# |
Dec 1st 2017, 13:46 |
casmo |
I always find myself cheating in those template engines like: {php} echo $var; {/php} |
# |
Dec 1st 2017, 13:46 |
hmic |
to make use of basic functionality for desiners e.g. |
# |
Dec 1st 2017, 13:46 |
dereuromark |
for normal cake templates there is no immediate need at this time. It can sometimes produce cleaner and safer code, but it also slows you dont a bit sometimes. tradeoffs. |
# |
Dec 1st 2017, 13:46 |
hmic |
more basic and constraint |
# |
Dec 1st 2017, 13:46 |
casmo |
With all the helpers and stuff, I think plain PHP is just easier/better |
# |
Dec 1st 2017, 13:46 |
hmic |
smarty - like twig - is for non-php programmers |
# |
Dec 1st 2017, 13:46 |
casmo |
I suppose I didn't know better |
# |
Dec 1st 2017, 13:46 |
hmic |
- and is still used in many shop systems today |
# |
Dec 1st 2017, 13:46 |
dereuromark |
the main reason for now was that bake templates generate php code, and for that you need sth like this :slightly_smiling_face: |
# |
Dec 1st 2017, 13:46 |
hmic |
why was smarty a thing back in the time? |
# |
Dec 1st 2017, 13:45 |
hmic |
depends a lot... |
# |
Dec 1st 2017, 13:45 |
casmo |
big, I mean "good" |
# |
Dec 1st 2017, 13:45 |
casmo |
Back in the days I've worked several years with Smarty... But since CakePHP I do not wanna go back anymore |
# |
Dec 1st 2017, 13:44 |
casmo |
What is a big reason to use a template engine like that? |
# |
Dec 1st 2017, 13:19 |
admad |
bake templates do support twig templates natively now :slightly_smiling_face: |
# |
Dec 1st 2017, 13:01 |
hmic |
you can base64 encode an image to post, you can create a form encoded version too and there are several more options |
# |
Dec 1st 2017, 13:00 |
hmic |
kant, first check what format and how the remote api wants your data |
# |
Dec 1st 2017, 12:38 |
wyrihaximus |
@rudy1976s no, but: https://github.com/wyrihaximus/twigview |
# |
Dec 1st 2017, 12:36 |
rudy1976s |
does cake supports twig natively ? |
# |
Dec 1st 2017, 12:00 |
unclezoot |
is there a style guide or a convention on labelling though? |
# |
Dec 1st 2017, 12:00 |
unclezoot |
fair enough |
# |
Dec 1st 2017, 11:59 |
dereuromark |
always use assoc arrays, so the latter |
# |
Dec 1st 2017, 11:59 |
unclezoot |
hi - are there any best practices for using Configure::write to configure your plugins? e.g. if you wanted to toggle features on/off, is it best to do Configure::write('MyPlugin', ['feature1', 'feature2', ...]), or Configure::write('MyPlugin', ['feature1' => true, 'feature2' => true ...]); , or something else entirely? |
# |
Dec 1st 2017, 11:47 |
kant |
i.e "Http\Client\Response Object Unsupported Media Type" are you familiar with this ? |
# |
Dec 1st 2017, 11:46 |
kant |
slackebot2 i am using $http = new Client(); to post some data and i also want to post images but its giving me error |
# |
Dec 1st 2017, 11:46 |
kant |
hi <slackebot2> |
# |
Dec 1st 2017, 11:42 |
birdy247 |
would you expect anything in my validationDefault to be called? |
# |
Dec 1st 2017, 11:42 |
birdy247 |
If I set validate => false |
# |
Dec 1st 2017, 11:32 |
kant |
anyone there ? |
# |
Dec 1st 2017, 11:29 |
kant |
I am using $http = new Client(); to update data in third party API , I want sending all data in json format how can i send the image data ? |
# |
Dec 1st 2017, 11:09 |
birdy247 |
Presumably I need to make a new provider |
# |
Dec 1st 2017, 11:09 |
birdy247 |
but want to make it reusable across different models |
# |
Dec 1st 2017, 11:08 |
birdy247 |
File uploaded https://cakesf.slack.com/files/U0T295QA3/F87NSK8JD/-.php / https://slack-files.com/T053DPNCM-F87NSK8JD-2a61f83f4f |
# |
Dec 1st 2017, 11:08 |
birdy247 |
I have made this |