| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Comments:
<0> :( <0> dools: what i wanted to loose :P <0> dools: to use php's dynamic variables <1> fresH^: you shouldn't use $this->var if you haven't declared it at the top of the cl***. turn your error reporting up <1> fresH^: you mean so that you can have an object that is built from the database and inherit from it and do $obj->field_value ? <0> dools: u sure it casts and error ? php is kinda used to not defining variables .. <2> php-bot: tell fresH^ about u <2> Sooner or later he'll learn. <1> fresH^: turn your error reporting up :-) <0> stop with the u already :P <2> fresH^: Yes, you stop. <1> fresH^: our sentiments exactly <0> dools: and yes to the first point <1> fresH^: if you're going to do $obj->field_value you can't make it private <0> dools: sad :( <1> fresH^: that's the point of a private variable!!!
<2> That's... the entire point. <0> no wait <1> fresH^: baaahhhhdeerrrrrrrrrrrrrrrr <0> its not $obj->field_value its $obj->fieldname <0> and why is that the entire point <3> so people cant **** with it <0> i know my database structure ... and if i know all should be private, i wanna do them all private, but by auto doing it <0> think you mistunderstand me <2> fresH^: It's simple. Do you touch another guy's penis? <1> haha <2> You wouldn't right? Cause its P R I V A T E <1> kuja: you ***uming fresH^ is male? <4> Anyone awake? <0> listen u arent getting my point <0> you* <4> Good ^^ <0> :P <5> fresH^: you're missing the point of a private variable <0> no <0> i dont <2> dools: Better to ***ume as a guy, or else some woman would make the ***umption that I'm ***uming women are stupid. <4> How to use INCLUDE to include functions in a cl***? <3> !tell fresH^about u <1> Nekusagi: you again!! you back to ask more flabbergasting questions? <2> php-bot: tell fresH^ about u <2> Dammit. <5> you can't call something private and expect it to do what *you* think about private is <4> dools,: ??? <0> i just dont want to predefine it private i wanna auto private it <1> Nekusagi: you mean mix-ins? <5> s/about// <1> fresH^: if you make it private you won't have access to ti <1> s/ti/it/ <5> there's no such thing as 'auto private' <4> dools,: Well, I dunno what 'mix-ins' is, but, I just don't want load up functions that I won't use. <0> dools: __set and __get <0> :P <0> anyway maybe i dont want to access it like a public var <1> Nekusagi: see www.php.net/__autoload <0> __autoload rux <4> dools,: reading <0> rox* <5> fresH^: you can define public methods which can get and set your private variables <0> GarethAdams: u dont have to .. use __set and __get in php and u kinda use private vars as public <2> php-bot: tell fresH^ about u <1> fresH^: if you are creating an array called $keys inside your cl***, then just override __get and make it return the value for that key from your private array <2> I'd say if an op was here, fresH^ would've been kicked already. <0> do public __set($propName,$propValue) { $this->$probName = $probValue; } <2> That's my fifth time telling you about `u', fresH^ <2> It's starting to become a habit. <0> sorry kinda in the fingers :) <4> dools,: it isn't it... <2> fresH^: Fix it <0> dools: huh ? <0> makes no sence <4> I have 1 cl***, and I want to load the cl*** functions in modules <1> fresH^: http://pastebin.com/622745 <4> can I (cl***)->function () when creating it? <1> Nekusagi: use smaller cl***es <0> dools: but i dont want an array called keys
<4> The cl*** itself is small, I just want it even smaller <1> fresH^: what?? who cares what it's called! <0> dools: i want $this->title to be private when i do $this->title = "lol" without predefining it in the start of the cl*** <1> fresH^: you can't <0> dools: no i figured that much so far :P <1> fresH^: you can't do it because it makes absolutely no sense and you shouldn't want to do it <0> dools: that i dont get <6> fresH^: Good "OOP" declares all cl*** properties at cl*** defintion time. <6> fresH^: Otherwise, you have to go digging through method code to find where $this->title gets created. <0> dools: say i have 30 fields in my table in the db ... every single one i want as a cl*** attribute .. but i dont wanna predefine them all because php gives u the ability not to <0> TML: php isnt oop comeone <2> Heh <6> fresH^: Yes, it is. <0> TML: its wannabe :P <2> There is no such thing as a wannabe "OOP" <7> php is very OOP <2> Why don't people understand that OOP is a paradigm, not a ****ing implementation. <4> God... create a cl*** just for login... <7> heh it's scary how close PHP and Java's OOP is <1> jiggster: don't let TML hear you say that ... <7> it's true though <6> dools: Don't be ignorant. I admitted they're close. What I objected to was your implication that PHP "copied" it from Java, and thus PHP should behave the same as Java. <8> will a micro ATX mainboard holes line up in an ATC case or is the layout for the fasteners different? <2> ... <8> the* <6> iGotNoTime: Wrong channel. <8> yes :P <8> sorry <8> sorry about that guys, I really did mean to type that in another channel :P <0> :( <0> anyone still wanne help me with my problem ? <2> If you're not going to act like an ***, I'm sure. <2> Then people will gadly help. <0> how did i act like an *** ? <2> What is your problem? <6> fresH^: PHP is OOP. <0> hehe <2> If you don't know what OOP is, don't speak. <2> From a paradigm point of view, C can be object oriented. <2> The implementation, however, has been called C++ <0> i do know what oop is .. i just dont think php 5 is that 100% yet .. its close but not 100% .. sry but thats my opionio <0> with C it was with structs right ? <0> :) <6> fresH^: OOP can be done in just about any language, including C and PHP. <2> It's not datastructures that define what is OOP and what is not. <6> I've rarely seen a language that can't be used as OOP. <6> fresH^: If you want to debate whether or not PHP is "100% OOP", you're in the wrong channel. If you want help with PHP, stop debating. <0> tbh i didnt wanna start a riot .. if i didnt like php i wouldnt even be here <0> ok .. you suggest that i just define every variable in the start of my cl*** when i want it private ? <6> fresH^: Good programming practice is to declare all variables as soon as possible, because it makes the code easier to maintain. <6> Regardless of whether it's private, protected, public, or what-have-you. <0> yes but you dont normally do that in php <6> fresH^: That just means you don't write good PHP. <6> Now is your time to start. <0> hmm <2> cl*** Foo { public $foo, $bar; private $baz, $qux; } <2> You should only have to dig in the cl*** declaration or the constructor for newly defined cl*** properties. <0> TML: in your opinion is this outside oop as well ? in php ? <6> fresH^: Absolutely <6> Always declare your variables. <9> hi, are there any tricks for repopulating form data on error, other than checking for the post variable for every field? <0> so at the start of each file you would have $str = ""; and later when you used it $str = "test"; ? <0> you can check if the button isset and if that is isset the rest of the form should be too <2> fresH^: That's outside the OOP >>implementation<< that PHP provides. No you shouldn't do that. <0> ok but thats what i asked TML about :) <2> s/shouldn't/wouldn't/ <2> You can, but keeping clear *how* they get defined is essential. <3> yay! i got a bzflag server running? <0> hmm ok
Return to
#php or Go to some related
logs:
deconvolution scipy ubuntu cups pdf from gimp #openzaurus FX-Scroll jscript
#sed installing cpkg in ubuntu ubuntu timed login log into root in ubuntu ssh sudo unknown id Syntax error decompyle
|
|