logs archiveIRC Archive / Freenode / #php / 2015 / September / 21 / 1
Bad_Advice_Cat
http://uploadpie.com/NArJt <-- Your code, with mainly Presentation logic highlighted in Green.
Matworms
Is there a way to get the properties of an SplFileObject instance through reflection?
Bad_Advice_Cat
Arnas, http://uploadpie.com/guJlD <-- the above example with presentation highlighted in green. You want your presentation to be "The last possible thing". - You can go further than this, and make use of a template engine, remove presentation away from this file. http://www.phptherightway.com/#templating
(well, you can achieve this without a template engine... via include(), though Template Engines libraries are more elegant.)
HAVE FUN!
Arnas
Bad_Advice_Cat, dude, I'm just following the course for now
I'll get to this later on, not now
Bad_Advice_Cat
Arnas, could do both ;) two separate projects.
ProNoob13
Because feature creep is always a good idea?
bobbiejim
could someone tell me why i have the syntax error with the equals sign on line 7 here? http://pastebin.com/eQxP4XHV
im new to PHP so im not exactly sure what you can/cant do
Bad_Advice_Cat
bobbiejim, this isn't javascript.
bobbiejim
would it be better if i put this into a <script> tag in my HTML code>?
yeah im dumb. cant do blah.doBlah in PHP lol
         

freite
what
Bad_Advice_Cat
bobbiejim, yes. into the script tag where it belongs. :)
bobbiejim
gotchya, thanks :)
Bad_Advice_Cat
bobbiejim, where exactly are you learning PHP from?
Can you link us to the Web page for it?
bobbiejim
well im just kinda learning as im going. attempting to make a doodle poll type webapp and learning whats required for that as i go
so i was looking into how i could add new rows if i wanted to add a new user to the doodle poll schedule
Bad_Advice_Cat
bobbiejim, it would be better to learn PHP properly.
bobbiejim
what would you recommend?
Bad_Advice_Cat
bobbiejim, to go through the basics of PHP. So that you do not end up with parse errors, knowing what you can and can not do with PHP. :+)
bobbiejim
oh i meant like what class :D
codeacademy etc/
Bad_Advice_Cat
bobbiejim, here. https://bpaste.net/show/162ddf54660b Reading through #1 - #16 - Practicing at each step.
bobbiejim
cool, thank you Bad_Advice_Cat, ill check that link out
Bad_Advice_Cat
bobbiejim, http://codepad.viper-7.com/ceYRkT <-- more instruction terminators.
YamakasY
ok, I have 2 queries on 2 different tables and I get or no result or a result from one of them. It could be both but that is not the case atm... what should i do, combine the arrays I get and go from there or do 2 whiles with ifstatements ?
freite
um, depends
and how can you combine the data? both queries returns data in the same structure?
YamakasY
freite: mhh you are right, I don't have a reference
between them
so, I think I need 2 whiles ?
ProNoob13
Probably, yes.
freite
probably, without knowing any details
YamakasY
yeah, no problem but I wanted to verify
I need to see what I get back and do something with it, but I need to find out where I di if in if ;)
*do
Alphos
YamakasY why would you have two tables with combinable data ?
why not just have one table with data from your two original tables ?
YamakasY
Alphos: I have that one one system, I need to compare 2 tables somewhere, not here
laterz, gone
         

Bad_Advice_Cat
That could be done with 1 table.
YamakasY
Bad_Advice_Cat: not when the data is different all the time and it are two seperate systems
aretecode
With a program that is still in alpha, can http://semver.org/ be used still to make MAJOR changes, without incrementing the X in x.y.z ?
First thought was 01.y.z but I'm not 100%
Alphos
aretecode how should we know ? ask whoever supports semver.org
aretecode
Alphos, there are 4 pages of open issues. I thought maybe someone had experience with it.
freite
i'm confused
aretecode
freite, what are you confused about?
freite
what you were actually asking
undrinkablesoup
http://pastebin.com/raw.php?i=C269nZLj <-- $doc->encoding = $the_encoding; only logs the error "Invalid Document Encoding". That's why I added the code below, in a vain attempt to make it log what the "invalid" document encoding actually was! But it doesn't log it! What's wrong?
Alphos
aretecode : !+g10
php-bot
aretecode , 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.
Alphos
undrinkablesoup why not var_dump($the_encoding) instead ?
aretecode
freite, there are 3 version numbers. It says them in the first paragraph of http://semver.org/. One I am working on is still 0.8.0, if I increment the 0, that wold seemingly indicate something other than what I want to convey.
Alphos
and what on earth would you expect code called after an error to affect that error in any way ?
aretecode for the third time, we do not support semver.org. stop asking about it.
freite
apparently some sort of versioning system some dude came up with...no i have no clue about that
Alphos
well, we still don't support whatever it is
aretecode
Alphos, 1) I was answering a question 2) you seem to have a different definition of what a pre-written script is. The definition of that command does not seem to fit where you are attempting to use it. 3) Since it is does not exactly in that versioning system, it was more of a thought of how it could be done since that versioning system does not cover it.
Alphos
aretecode 1) you still hadn't (and possibly haven't) understood this is not the proper channel to talk about this. 2) you stopped reading at the first thing that didn't match what you're asking about. read the rest. 3) you still haven't understood this is not the proper channel to talk about this
aretecode
Alphos, my apologies - I really should have read the whole thing first.
All the same, talking here did fix my problem. :3
Alphos
buy a rubber duck...
aretecode
Alphos, #offtopic. Why would I need any additional rubber ducks?
Alphos
aretecode
Cute.
undrinkablesoup
Alphos: Because I don't know *when* the error happens?
morfin
when interfaces are really nesessary?
sorabji
morfin: when you want different objects to share the same type without extending each other
Bad_Advice_Cat
(Action) wonders what bobbiejim thinks of the written php tutorial.
morfin
btw another question related to that but not exactly
did you use multiple inheritance anywhere?
sorabji
php doesn't suppot multiple inheritance
support*
morfin
in PHP via multiple interfaces
i mean
not inheritance but hack around
sorabji
hack around?
morfin
oops
workaround
freite
you should probably look at java if you wanna understand that stuff and when it's really useful
morfin
like class SomeClass implements SomeInterface,SomeAnotherInterface {...}
Alphos
undrinkablesoup once again, var_dump($the_encoding)
sorabji
implementing multiple interfaces isn't really a workaround for multiple inheritance
morfin: but yes, implementing multiple interfaces is common enough
aretecode
or/and traits
morfin
but it allows have methods from different places
sorabji
not really
biberu
morfin: that's just saying your type supports all those roles/behaviours, it's not the same as multiple inheritance
morfin
i know
biberu
it's not a work around for it either
morfin
but there is one problem
tw2113
keeping track of all the sources?
morfin
maybe it's not a problem but imagine i have class implementing some interfaces, but i want to have something implementing also another interface(s)
inherit and tell implement that?
tw2113
i kind of have to believe if you're trying to tie all these sources into one new class, you're probably trying to make that class do too much
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 next »