# |
Apr 26th 2019, 10:05 |
martin |
not direct an exception in cakephp |
# |
Apr 26th 2019, 10:05 |
martin |
I see the domain does not have email configured yet (no mx records), so I think that is the problem, but I expect that it fails later |
# |
Apr 26th 2019, 10:04 |
martin |
When emailadres does not exists the email class in cakephp gives unknown error? that is new for me :| |
# |
Apr 26th 2019, 09:52 |
patox44 |
I tried run it without /stock, but with or without paterns I get Object not found. Maybe I have to set special option or something like that? |
# |
Apr 26th 2019, 09:41 |
asdfgh |
:) he he ok |
# |
Apr 26th 2019, 09:39 |
neon1024 |
Code which has never been written can never be refactored |
# |
Apr 26th 2019, 09:39 |
neon1024 |
Have some self-confidence! |
# |
Apr 26th 2019, 09:39 |
asdfgh |
ah ... ok :D |
# |
Apr 26th 2019, 09:39 |
neon1024 |
If it works, then it is the correcy way |
# |
Apr 26th 2019, 09:39 |
asdfgh |
it returns 'http://localhost:7895' |
# |
Apr 26th 2019, 09:38 |
asdfgh |
neon1024, i have tried the code, it is working...i am just asking if this is the correct way |
# |
Apr 26th 2019, 09:38 |
neon1024 |
I would suggesting trying some stuff by yourself rather than checking every keypress with Slack |
# |
Apr 26th 2019, 09:37 |
neon1024 |
PHP can parse your code for you. You don’t need me to parse your code for you. |
# |
Apr 26th 2019, 09:36 |
asdfgh |
this ?? |
# |
Apr 26th 2019, 09:36 |
asdfgh |
neon1024 pardon just to be sure, $this->getRequest()->getUri()->getScheme() . "://" . $this->getRequest()->getUri()->getHost() . ":" . $this->getRequest()->getUri()->getPort() |
# |
Apr 26th 2019, 09:32 |
asdfgh |
i should avoid adding :80 |
# |
Apr 26th 2019, 09:32 |
asdfgh |
i should check when it will be in production |
# |
Apr 26th 2019, 09:32 |
asdfgh |
so i have 8888 port |
# |
Apr 26th 2019, 09:32 |
asdfgh |
however now i am testing in local server |
# |
Apr 26th 2019, 09:32 |
asdfgh |
thanks |
# |
Apr 26th 2019, 09:32 |
asdfgh |
i will concatenate host and port |
# |
Apr 26th 2019, 09:32 |
asdfgh |
thanks |
# |
Apr 26th 2019, 09:32 |
asdfgh |
ok |
# |
Apr 26th 2019, 09:32 |
asdfgh |
neon1024 ok that was my doubt...i thought there was a method to get all the info with the port too |
# |
Apr 26th 2019, 09:31 |
neon1024 |
You can use `$this->here` but it’s being deprecated, so implementing the PSR7 interface is preferred |
# |
Apr 26th 2019, 09:31 |
neon1024 |
Yes |
# |
Apr 26th 2019, 09:31 |
asdfgh |
neon1024 pardon i do not follow you, should i "compose" the url by getting getHost() and thne getPort() ? |
# |
Apr 26th 2019, 09:31 |
neon1024 |
`->setPatterns(['code' => '[\w-\/]+'])` ? |
# |
Apr 26th 2019, 09:30 |
neon1024 |
Could the pattern not be used to match a `/` ? |
# |
Apr 26th 2019, 09:30 |
neon1024 |
Although in that instance I think `**` might include the `/stock` part :thinking_face: |
# |
Apr 26th 2019, 09:29 |
neon1024 |
Might be worth checking the book, as I’m not 100% certain |
# |
Apr 26th 2019, 09:29 |
neon1024 |
@patox44 I presumed in the url `->connect('/dataset/**/stock` |
# |
Apr 26th 2019, 09:28 |
neon1024 |
I don’t know why you would do that |
# |
Apr 26th 2019, 09:28 |
neon1024 |
No. |
# |
Apr 26th 2019, 09:28 |
asdfgh |
pardon withUri() |
# |
Apr 26th 2019, 09:28 |
asdfgh |
neon1024 yes so i should get that object and then pass to withHOst ? |
# |
Apr 26th 2019, 09:28 |
neon1024 |
Which has methods to get all the parts of the url, use those is my suggestion |
# |
Apr 26th 2019, 09:28 |
patox44 |
do you mean something like this? |
# |
Apr 26th 2019, 09:28 |
neon1024 |
PSR7 encompasses a uri in a class instance |
# |
Apr 26th 2019, 09:27 |
neon1024 |
This is the bit you’re interested in |
# |
Apr 26th 2019, 09:27 |
neon1024 |
@return \Psr\Http\Message\UriInterface Returns a UriInterface instance 2307: * representing the URI of the request. |