# |
Mar 2nd 2018, 06:17 |
savant |
@turkles but you can use background jobs :slightly_smiling_face: |
# |
Mar 2nd 2018, 06:17 |
savant |
Nah |
# |
Mar 2nd 2018, 04:04 |
turkles |
My shell basically grabs different (somewhat related) data from an external API, I have a behaviour set up to perform the 'fetch'. Can you do a dispatch shell from a behaviour? Because that might work, a second behaviour |
# |
Mar 2nd 2018, 03:57 |
ricksaccous |
oh yeah that's a good idea too |
# |
Mar 2nd 2018, 03:57 |
rchavik |
you can use Behaviours |
# |
Mar 2nd 2018, 03:52 |
ricksaccous |
now that i read your use case again, i would think |
# |
Mar 2nd 2018, 03:52 |
ricksaccous |
actually trait is the best |
# |
Mar 2nd 2018, 03:52 |
ricksaccous |
or still extend AppModel and only use it there so it's available everywhere |
# |
Mar 2nd 2018, 03:52 |
ricksaccous |
or create a trait like ShellAwareTrait and use it |
# |
Mar 2nd 2018, 03:51 |
ricksaccous |
or do a use statement in the model with the shell class rather |
# |
Mar 2nd 2018, 03:51 |
ricksaccous |
just create a shell class and use it in the model |
# |
Mar 2nd 2018, 03:50 |
turkles |
it's in a shell, the stuff I need will call other shells too |
# |
Mar 2nd 2018, 03:50 |
ricksaccous |
and do it that way |
# |
Mar 2nd 2018, 03:50 |
ricksaccous |
you can have all your table models extend an AppTable class |
# |
Mar 2nd 2018, 03:48 |
turkles |
yes.. 3.4 I think |
# |
Mar 2nd 2018, 03:48 |
ricksaccous |
are you using cakephp3? |
# |
Mar 2nd 2018, 03:47 |
turkles |
Hi all, I want to create a function which can be re-used in my shell for different models.. what is this called so I can find in the docs? eg. I want to be able to do $this->$modelname->function() rather than naming the modelname |
# |
Mar 2nd 2018, 01:44 |
ricksaccous |
i should have read the middleware section of the book |
# |
Mar 2nd 2018, 01:43 |
ricksaccous |
i fixed it ;) |
# |
Mar 2nd 2018, 01:42 |
ricksaccous |
gawddddd |
# |
Mar 2nd 2018, 01:42 |
ricksaccous |
heh it's the error handling middleware |
# |
Mar 2nd 2018, 01:31 |
ricksaccous |
I'm going to give up on this for now |
# |
Mar 2nd 2018, 01:26 |
ricksaccous |
nah, same problem, same place |
# |
Mar 2nd 2018, 01:23 |
ricksaccous |
I'm updating cake hoping it goes away, heh |
# |
Mar 2nd 2018, 01:20 |
ricksaccous |
I'm at a loss as to why that line would have anything to do with error suppression |
# |
Mar 2nd 2018, 01:15 |
ricksaccous |
anything after that seems to have problems |
# |
Mar 2nd 2018, 01:15 |
ricksaccous |
anything before that line seems to show |
# |
Mar 2nd 2018, 01:12 |
ricksaccous |
here it is https://github.com/cakephp/cakephp/blob/master/src/Http/BaseApplication.php#L118 |
# |
Mar 2nd 2018, 01:10 |
ricksaccous |
so errors are suppressed from the browser for me after this return new ActionDispatcher(null, null, DispatcherFactory::filters()); |
# |
Mar 2nd 2018, 01:00 |
ricksaccous |
@rchavik thank ye |
# |
Mar 2nd 2018, 00:58 |
rchavik |
debug(\Cake\Error\Debugger::trace()); die(); |
# |
Mar 2nd 2018, 00:56 |
ricksaccous |
like let's say i'm in a controller method and i want to say "show all code run up till here" |
# |
Mar 2nd 2018, 00:56 |
ricksaccous |
is there a way in cakephp i can see all code that is run up to a certain point? |
# |
Mar 2nd 2018, 00:50 |
diego182 |
Hi, i have two tables, one of then has two composite pk, one is related to other, the table with the composite pk belongs to the table with no composite PK, how do i patch this entity with composite PK? |
# |
Mar 2nd 2018, 00:24 |
ricksaccous |
probably it's somewhere in my application code |
# |
Mar 2nd 2018, 00:24 |
ricksaccous |
because outside of it i get the errors shown, time to go hunting |
# |
Mar 2nd 2018, 00:23 |
ricksaccous |
so it's actually code somewhere in cake or something that is suppressing the errors |
# |
Mar 1st 2018, 23:55 |
ricksaccous |
no that's the integer for E_ALL |
# |
Mar 1st 2018, 23:54 |
ricksaccous |
REEEEEEEEEEEEEEEE |
# |
Mar 1st 2018, 23:54 |
ricksaccous |
that's probably the problem right there |
# |
Mar 1st 2018, 23:54 |
ricksaccous |
yeah other one is the same val... |