# |
May 3rd 2019, 09:11 |
neon1024 |
> a character symbolizing the idea of a thing without indicating the sounds used to say it. Examples include numerals and Chinese characters. |
# |
May 3rd 2019, 09:11 |
neon1024 |
I wonder what an ‘ideograph’ is :thinking_face: |
# |
May 3rd 2019, 09:11 |
neon1024 |
> matches a letter or ideograph that does not have lowercase and uppercase variants |
# |
May 3rd 2019, 09:10 |
neon1024 |
https://regex101.com/r/b3yYqN/1 |
# |
May 3rd 2019, 09:10 |
neon1024 |
Accents I mean. Geez, perhaps I need a second coffee today! |
# |
May 3rd 2019, 09:10 |
neon1024 |
So it’ll understand `Chloë` |
# |
May 3rd 2019, 09:10 |
neon1024 |
Ahh, it’s using tokens for matching non latins |
# |
May 3rd 2019, 09:09 |
neon1024 |
I can’t understand that one |
# |
May 3rd 2019, 09:09 |
neon1024 |
Yeah, that’s what I said :flushed: |
# |
May 3rd 2019, 09:09 |
spriz |
The regex power is strong is this one |
# |
May 3rd 2019, 09:09 |
spriz |
`/^[\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nd}]+$/Du` :) |
# |
May 3rd 2019, 09:09 |
neon1024 |
,:) |
# |
May 3rd 2019, 09:08 |
spriz |
it is still a thing @neon1024 https://api.cakephp.org/3.7/class-Cake.Validation.Validator.html#_alphaNumeric |
# |
May 3rd 2019, 09:08 |
neon1024 |
As that’s just [\d\w]+ I think |
# |
May 3rd 2019, 09:07 |
neon1024 |
Is that still a rule in 3.7/ |
# |
May 3rd 2019, 09:07 |
neon1024 |
alphaNumeric? |
# |
May 3rd 2019, 09:05 |
spriz |
It sure does - I would do it that way, but whenver I've used regex validation rule before I usually end up finding another rule that would do the job later :) :) |
# |
May 3rd 2019, 09:03 |
Martin` |
some validation with regex maybe? does that exist? |
# |
May 3rd 2019, 09:00 |
spriz |
Hi folks! I have a field on my entity that should not contain whitespaces - is there some sneaky validation rule I should use rather than writing my own? :) : D |
# |
May 3rd 2019, 08:31 |
kgb.acct.personal |
Got it. I'll see for myself |
# |
May 3rd 2019, 08:30 |
neon1024 |
Although do check yourself, and look at the tests and stuff so your ticket doesn’t get insta-closed |
# |
May 3rd 2019, 08:30 |
neon1024 |
Worth opening a ticket about imho though |
# |
May 3rd 2019, 08:30 |
kgb.acct.personal |
That would work around the issue. Thanks. Though, I personally prefer using `?page=2` it is so much easier to read |
# |
May 3rd 2019, 08:30 |
neon1024 |
Perhaps you’ll need to write your own Paginator? Extend the existing one |
# |
May 3rd 2019, 08:30 |
neon1024 |
It does look a bit fixed to me |
# |
May 3rd 2019, 08:30 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Datasource/Paginator.php#L175-L176 |
# |
May 3rd 2019, 08:28 |
neon1024 |
Simplistically I suppose you could read the value and set the page to that value in your controller, but not ideal |
# |
May 3rd 2019, 08:28 |
neon1024 |
I’ve never liked things like that which intentionally make things more obscure |
# |
May 3rd 2019, 08:27 |
kgb.acct.personal |
Spec want me to use `?p=1` instead of `?page=1` |
# |
May 3rd 2019, 08:26 |
neon1024 |
So probably just change the config, although I’m not sure why you’d want to change it |
# |
May 3rd 2019, 08:26 |
neon1024 |
https://github.com/cakephp/cakephp/blob/master/src/Controller/Component/PaginatorComponent.php#L286 |
# |
May 3rd 2019, 08:24 |
kgb.acct.personal |
Hi. How can I use other query string instead of `?page=` when paginating? |
# |
May 3rd 2019, 08:23 |
neon1024 |
Morning everyone, happy Friday :tada: |
# |
May 3rd 2019, 06:48 |
admad |
using `UsersRepository::class` that is instead of `'App.Users'` |
# |
May 3rd 2019, 06:47 |
admad |
@maymeow the latter makes refactoring easier if required in future |
# |
May 3rd 2019, 06:42 |
maymeow |
Business logic ``` $this->loadRepository('App.Users'); ... $this->getRepository()->Users->doSomething(); ``` vs ``` repository(UsersRepository::class)->doSomething(); ``` What do you think? |
# |
May 3rd 2019, 02:48 |
hollistergraham123 |
Nvm |
# |
May 3rd 2019, 02:37 |
hollistergraham123 |
Can I not override a behaviors function when extending it |
# |
May 3rd 2019, 01:16 |
daniel.upshaw |
Since it is creating a tree of the `tests` records |
# |
May 3rd 2019, 01:14 |
daniel.upshaw |
Why not do it this way though? ```CREATE TABLE `tests` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) unsigned NOT NULL, `name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;``` |
# |
May 3rd 2019, 01:12 |
daniel.upshaw |
And also how you name the foreign keys.. but it looks like you've done that in your table |