# |
Sep 27th 2016, 17:59 |
kund |
mm |
# |
Sep 27th 2016, 17:59 |
kund |
m |
# |
Sep 27th 2016, 17:59 |
kund |
m |
# |
Sep 27th 2016, 17:59 |
kund |
m |
# |
Sep 27th 2016, 17:07 |
tiagoa |
I've has editing the wrong file |
# |
Sep 27th 2016, 17:06 |
tiagoa |
hahaahahaha |
# |
Sep 27th 2016, 17:06 |
tiagoa |
I was sleepy... |
# |
Sep 27th 2016, 17:06 |
tiagoa |
ok, it's my mistake, don't worry... |
# |
Sep 27th 2016, 17:04 |
hmic |
whats the error? |
# |
Sep 27th 2016, 17:03 |
tiagoa |
I'll review my code |
# |
Sep 27th 2016, 17:03 |
tiagoa |
I've tried but it dont works |
# |
Sep 27th 2016, 17:01 |
hmic |
you can just implement it as before: http://book.cakephp.org/3.0/en/orm/table-objects.html#beforefind |
# |
Sep 27th 2016, 16:58 |
tiagoa |
How do implement beforeFind in cakephp 3? Have I do a EventListener???? like this: http://book.cakephp.org/3.0/en/orm/table-objects.html#initialize? |
# |
Sep 27th 2016, 16:55 |
hmic |
good to have been helpful |
# |
Sep 27th 2016, 16:55 |
froodley |
@hmic Success! Thanks for the tip :D |
# |
Sep 27th 2016, 16:26 |
froodley |
trying that... |
# |
Sep 27th 2016, 16:18 |
hmic |
just add the definition to the composer.json "autoload" section then |
# |
Sep 27th 2016, 16:18 |
froodley |
not being found by the autoloader |
# |
Sep 27th 2016, 16:17 |
froodley |
it's in /Lib/Interface |
# |
Sep 27th 2016, 16:17 |
hmic |
you just need to adhere to the conventions for placing and naming the files |
# |
Sep 27th 2016, 16:17 |
froodley |
an interface we wrote |
# |
Sep 27th 2016, 16:17 |
hmic |
if its in your app dir, composer takes care already! |
# |
Sep 27th 2016, 16:17 |
hmic |
wait, what are you trying to autoload and failing? |
# |
Sep 27th 2016, 16:17 |
froodley |
oh, so, moving all the interfaces and traits and etc into a composer package so composer will bring them in instead? |
# |
Sep 27th 2016, 16:16 |
hmic |
you can just add the requirements to the composer.json and composer dump-autoload |
# |
Sep 27th 2016, 16:16 |
hmic |
sure. if composer handles autoload |
# |
Sep 27th 2016, 16:16 |
froodley |
we already bring cake2 in with composer, but i think that's not what you're talking about? |
# |
Sep 27th 2016, 16:15 |
hmic |
i'd go this way. if you dont and need custom autoloading, you've got the solution already. |
# |
Sep 27th 2016, 16:15 |
hmic |
and it solved the autoloading issues and dependencies at once |
# |
Sep 27th 2016, 16:14 |
hmic |
and there is composer suppport for cake2 available, its not as good, but working |
# |
Sep 27th 2016, 16:14 |
hmic |
cake3 uses composer (only) |
# |
Sep 27th 2016, 16:14 |
froodley |
have to think about that |
# |
Sep 27th 2016, 16:14 |
froodley |
interesting |
# |
Sep 27th 2016, 16:10 |
hmic |
composer? |
# |
Sep 27th 2016, 16:09 |
froodley |
that was the solution i'd come around to, just trying to be sure I'm not missing something built in to cake |
# |
Sep 27th 2016, 16:08 |
froodley |
oh, you're talking about adding to spl_autoload_register then? |
# |
Sep 27th 2016, 16:08 |
hmic |
check google for setting up the autoloader. its not a cake thing really |
# |
Sep 27th 2016, 16:07 |
froodley |
@hmic I have looked for documentation in the cookbook and haven't found anything, can you elaborate please? |
# |
Sep 27th 2016, 16:04 |
froodley |
add to spl_autoload_register? |
# |
Sep 27th 2016, 16:03 |
hmic |
configure the autoloader accordingly |
# |
Sep 27th 2016, 16:03 |
froodley |
how is this to be done correctly? |