# |
Jul 12th 2017, 17:18 |
sturm |
It looks like the API docs are going to be a major go-to resource for me. |
# |
Jul 12th 2017, 17:16 |
sturm |
Excellent, @mikesmoniker and @cleptric. I mean, I’ve got a decent grasp of PHP and just recently learned object-oriented PHP (classes, using the arrow (->) to get at an object’s properties and methods, how to call a static property/method, inheritance, abstraction, etc.) from Lynda. |
# |
Jul 12th 2017, 17:15 |
cleptric |
@sturm When I started programming in php, I took a similar path and to be honest, I regretted it later. Sure, the framework will do a lot for you, but having a reasonable background on oop php programming will help a lot. I started to contribute to CakePHP to do more plain php ^^ |
# |
Jul 12th 2017, 17:12 |
mikesmoniker |
Understanding the basics of PHP will go a long way (just like knowing Ruby is going to benefit someone writing a Rails app) in understanding what the framework is doing and how to get it to do other things. But for just getting started it’s definitely reasonable to focus on Cake’s conventions and learn *how* to do a bunch of the basic tasks vs. understanding the implementation details of what the framework is actually doing on your |
# |
Jul 12th 2017, 17:07 |
sturm |
I need to learn CakePHP’s syntax and vocabulary to use it. I *don’t* need to focus so much on the details of the underlying PHP. (i.e., what the $this object is, following the chain of calls, etc.) Does this sound anywhere close to correct? |
# |
Jul 12th 2017, 17:05 |
sturm |
Finished the first half of the Bookmarker tutorial. I think I’m beginning to see what I need to do when using Cake PHP: |
# |
Jul 12th 2017, 16:59 |
jarard01 |
the data is as I would expect |
# |
Jul 12th 2017, 16:58 |
jarard01 |
I thought I would also then have to remove them form validation, but it appears that they are set to hidden and there for by-pass validation by default meaning Angular and Cake dovetail nicely |
# |
Jul 12th 2017, 16:58 |
cleptric |
What‘s the content of $this->request->getData() in your Controller? |
# |
Jul 12th 2017, 16:57 |
jarard01 |
ok so I am using Angular to not show fields on my front end under certain conditions |
# |
Jul 12th 2017, 16:57 |
jarard01 |
it seems that is the case |
# |
Jul 12th 2017, 16:56 |
jarard01 |
fields I mean |
# |
Jul 12th 2017, 16:56 |
jarard01 |
ahh - does validation ignore hidden files? |
# |
Jul 12th 2017, 16:54 |
jarard01 |
it doesn't fire |
# |
Jul 12th 2017, 16:54 |
jarard01 |
https://gist.github.com/spacebiscuit/ad07583634b8d732ad532e7f429477f3 |
# |
Jul 12th 2017, 16:54 |
jarard01 |
cleptric, there is an issue with validation - look at this simple rule |
# |
Jul 12th 2017, 16:51 |
cleptric |
jarard01: This is an example :$ It just show you how you can contextually validate. |
# |
Jul 12th 2017, 16:45 |
ericadeefox |
rant: Facebook PHP SDK is really annoying to figure out how to work w at first but at least I know what I'm working towards now? Thanks a million @jeremyharris !!!!! |
# |
Jul 12th 2017, 16:39 |
jarard01 |
when I load my view: Notice (8): Undefined index: listing_type_id [APP/Model\Table\ListingsTable.php, line 113] |
# |
Jul 12th 2017, 16:39 |
jarard01 |
https://gist.github.com/spacebiscuit/ad07583634b8d732ad532e7f429477f3 |
# |
Jul 12th 2017, 16:39 |
jarard01 |
this looks to be a bug to me, this validation rule is taken from the book: |
# |
Jul 12th 2017, 16:33 |
dariolap |
ok thanks jeremyharris |
# |
Jul 12th 2017, 16:31 |
jeremyharris |
you can use the “on” key, like ‘on’ => ‘create’ |
# |
Jul 12th 2017, 16:30 |
jeremyharris |
dariolap have you checked out the docs on validation? they explain how to do so: https://book.cakephp.org/3.0/en/core-libraries/validation.html#conditional-validation |
# |
Jul 12th 2017, 16:29 |
dariolap |
Hi all, I have this code https://gist.github.com/anonymous/fe33d07deadd8ad3ad7fe9f45403cb17, how i can to validate this only on create? |
# |
Jul 12th 2017, 16:10 |
jeremyharris |
haha perfect analogy! |
# |
Jul 12th 2017, 16:09 |
ericadeefox |
nah I just didn't look at it hard enough. I just found the exceptions that were messin my tests up and turned em off lol. so I explain this to my husband, who is an auto mechanic, and he was basically like "you're dumb, that's like if one of your sensors is making your check engine light come on, and so you uninstall the sensor" lol!!! |
# |
Jul 12th 2017, 16:08 |
jeremyharris |
always worth looking at the vendor code ;) |
# |
Jul 12th 2017, 16:07 |
ericadeefox |
it never occurred to me that there could just be a built-in way to turn it off for testing....... |
# |
Jul 12th 2017, 16:07 |
ericadeefox |
I was scolded by 2 people yesterday for just going into the source code and do that tho. like I went in and just turned the exceptions off and made it so that it'd return the state values anyway. |
# |
Jul 12th 2017, 16:07 |
jeremyharris |
it’s working? |
# |
Jul 12th 2017, 16:06 |
ericadeefox |
jesus christ all I had to do was turn the damn thing off lol!!!! |
# |
Jul 12th 2017, 16:03 |
jeremyharris |
https://github.com/facebook/php-graph-sdk/blob/4.0-dev/src/Facebook/FacebookRedirectLoginHelper.php#L339 |
# |
Jul 12th 2017, 16:02 |
jeremyharris |
it’ll still write to the global, and everyone should be happy :) |
# |
Jul 12th 2017, 16:02 |
ericadeefox |
"they probably just disable session checking" I had thought so... |
# |
Jul 12th 2017, 16:01 |
jeremyharris |
@ericadeefox maybe check how facebook tests it. they probably just disable session checking, eg. that `$this->checkForSessionStatus` |
# |
Jul 12th 2017, 15:59 |
ericadeefox |
ohhh smdh I did not even think of that |
# |
Jul 12th 2017, 15:59 |
jeremyharris |
@ericadeefox I think I know what’s happening. cake sees it’s in the cli context so it doesn’t start the session the typical way. doing so usually breaks the cli if I remember correctly |
# |
Jul 12th 2017, 15:59 |
jlroberts |
any idea what the entry point might be for that? |
# |
Jul 12th 2017, 15:58 |
jlroberts |
I need to find the entry point and autoload the cakephp files |
# |
Jul 12th 2017, 15:58 |
jlroberts |
but that isnt the entry point |