logs archiveIRC Archive / Freenode / #php / 2015 / September / 30 / 1
Alphos
Chunk2 inorite, i was afraid there was subtext
Bittarman
thesecondone, modify multiple things.. save and hope for the best!
thesecondone
https://github.com/phpixie/orm
Bittarman
that basically removes it from any list of candidates for any job I'd take on.
if it can't even perform its flushing in a transaction, it can gtfo.
and thats really basic for any ORM nowadays, its about 4 / 5 years behind the curve
thesecondone
Bittarman
and looking through its code... several classes which extend classes which do nothing but extend other classes...
thesecondone, right, it should be default behaviour.
thesecondone
and it seems to have Mongo support, which Im kind of considering
Bittarman
not bolted on.
thesecondone
what do you mean"bolted on" ?
         

Bittarman
thesecondone, that feels very much like it was added as an afterthought.
also... locking? seems to have been entirely forgotten about
thesecondone
it looks like you are inventing this on the fly))
Bittarman
thesecondone, if you say so.
https://github.com/PHPixie/ORM/blob/master/src/PHPixie/ORM/Drivers/Driver/SQL/Query.php
extends PHPixie\ORM\Models\Type\Database\Implementation\Query.... wtf?
model type database implementation query?!
thesecondone
maybe its the Java talking in me
Alphos
Bittarman : why is it empty ? >_>
thesecondone
but so what?
Bittarman
thesecondone, even the biggest java zealot would wtf at that one.
thesecondone, so its rubbish.
thesecondone
let me check)
Bittarman
well, its not terrible for a one man attempt at something so large...
but overall, I wouldn't touch it.
thesecondone
ah I found it
its similar to how in the datbase repo there is a bunch of abstract SQL stuff that PDO extends
so I guess the idea in ORM is also to have a bunch of basic SQL stuff to extend (the Config kind of usggests that)
Bittarman
thesecondone, nope.
thesecondone
brb
Sourcey
Hello, anyone know mPDF ?
struggling with inserting multiple linebreaks through the WriteHTML()
Chiarot
Nope... it shows me "87*18.2" instead of "1583.4" http://pastebin.com/n9f7vmF8
Whiskey
Bittarman: :)
Bittarman
Sourcey, !+g10
php-bot
Sourcey, Guideline #10) We don't support script(s). We help you *write* PHP, not recommend or download and install/hack/modify/adapt/use pre-written scripts or third party APIs. Contact the authors of the script for support options they provide.
Bittarman
Chiarot, outside the "'s
inside them it will only interpolate the variables
Whiskey
is it possible to do foreach ($var as $value) and have and $i in it or do i have to do that separatly?
Bittarman
Whiskey, a counter, no, the key in the array, yes
foreach ($var as $key => $value)
the key can be, but is not guaranteed to be numeric, and can be, but is not guaranteed to be in order.
         

Whiskey
but i donĀ“t have to use the key right, value is same as (var as value) right?
Bittarman
Whiskey, its up to you...
Chunk2
2
Bittarman
depends what you want to actually do
Whiskey
let see what it gives me
Chiarot
@Bittarman when I do that I get Parse error: syntax error, unexpected '{', expecting ',' or ';'
Whiskey
Bittarman: actully after just to know when first iriation is done or what its called
Bittarman
Whiskey, $first = true; foreach ($values as $value) { if ($first) { .... ; $first = false } .... }
Alphos
Bittarman
Chiarot, no, you didn't do what I suggested, you guessed at something entirely different by the looks of it.
judging from the syntax error.
RobCWD
Hi, anyone know how to access the raw Guzzle request from the body? Got a weird issue where the guzzle request fails but if I do it manually it works
Alphos
and i'm out
Chiarot
Lemme double check...
Whiskey
Looks like it works whit key
Bittarman
Whiskey, like I said... they're not guaranteed to be numeric or in order.
the key 0, could be the first, fifth, or last or second item.
Chiarot
Oh shoot! I see it now, hahaha I had the var's still in {}, :$ thanks!
Bittarman
Whiskey, foreach ([1=>'a', 0 => 'b', 10 => 'c', 3 => 'd'] as $key => $value) { echo $key . "\n"; }
RobCWD, did you look in the guzzle docs?
RobCWD
Bittarman: yes and didn't find anything obvious
Bittarman
RobCWD, echo $request;
RobCWD
I don't have a $request - I'm using the $client->request('POST'... syntax
Bittarman
RobCWD, and what does that return? :)
RobCWD
a response object
Bittarman
nope
send returns a response object
what does request return...
Whiskey
Bittarman: yeh
Bittarman
oh hang on.. that might be an old version I'm thinking of
RobCWD
Yup :)
v 6 has rewired so I get an implicit send from $response = $client->request('POST', $uri...
cordovafan8
Hello. I'm trying to set up the server side of apple push notifcations with php. I'm having some trouble getting the following code to run: https://github.com/GustavoCostaW/PushNotificationBackendSamples/blob/master/ios.php
I have verified that my certificate and all the information provided is correct, since I can send notifications via ruby
The error I'm getting is: PHP Warning: stream_socket_client(): Failed to enable crypto in
followed by
PHP Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error)
laszlof
sounds pretty serious
cordovafan8
it seems to be a very very common problem
thebuccaneersden
ssl:// is a protocol?
cordovafan8
apparently so?
laszlof
did you try googling the error?
the very first page that comes up is extremely relevent
cordovafan8
laszlof: yep. It seems to be very common. I've gotten many tips on solving it through google, but so far no joy.
laszlof
in fact, the entire first page is full of the same issues
caffinated
cordovafan8: push service is rate limited
cordovafan8
caffinated: I can push with a ruby script with the same credentials, to the same server. This is also a single test push.
I've obviously got something wrong in my php, but I don't understand it well enough to see what's up
Bittarman
cordovafan8, path to your pem file correct?
caffinated
cordovafan8: well, i'd probably start with the obvious things, like the version of SSL being used. I'd probably also run tests using the openssl client.
cordovafan8
Bittarman: you, combined with that ruby script I think have provided the answer!
it required a fully qualified path
which I should have though of
man I'm silly
Bittarman, caffinated, laszlof : Thanks for your help guys. I haven't confirmed yet that it worked, but I think that solved the issue that was related to the php. Have a great night!
DissidentRage
I love that in WP I can spend half a day fixing a broken custom plugin
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 next »