« first day (747 days earlier)      last day (4184 days later) » 

8:00 PM
@tereško writing a class-map autoloader?
 
wrote ..
 
yet another one?!
 
well, to be fair at least it's not yet another PSR-0 autoloader
 
radio, you are playing "Friday"...
radio, STAHP
 
8:05 PM
Hey all
Is it ever a good idea to do function chaining like this:
3
A: php define custom functions and class

Nealfunction select(){ .... return new someObject; } class someObject { function where(){ ... return $this; } function join(){ ... return $this; } } Demo: http://codepad.org/iQ6QsvRB Remember to use -> instead of . in PHP. T...

?
 
if you stick to same instance , then it is no too harmful , though you loos some readability
also , stop making another ORM oh .. wait .. it's not your fault
 
@tereško But in the instance I answered. is that readable code that one can go back to and understand?
 
DB::select()->stahp();
 
also , don't class someObject { .. it is a class , you are not in javascript
 
@tereško eh?
 
8:08 PM
@Neal Class should return Object IMHO, not some function...
 
I was making a quick example.
 
you named it "someObject"
 
@tereško what should I have named it?
SomeObject?
 
someClass/SomeClass/SOMECLASS
 
Oh, that is true.
But a class can be an object
and vise versa
 
8:09 PM
no , in classical oop class is not an object
 
@tereško OOP === Object Oriented Programming?
 
yes
 
(emphasis mine)
ok? so
can you explain?
 
class is a blueprint
in prototype-based language , you can use another object as the blueprint
no class-based language you cannot
 
ok. So what makes an object an object in PHP vs a class?
 
8:11 PM
it has a handler ( in memory ) , it can be passed to other structures , it can be destroyed
 
@tereško examples?
This would make a good PHP SO question no?
 
no
it would make a really stupid question , with are RTFM answer
 
@tereško How is that?
 
@teresko: you might want to support phar with your autoloader: gist.github.com/3996171
 
@hakre what would be the use-case ?
 
8:14 PM
@tereško why would it be a manual q? it could have different meanings
 
@tereško \My\Namespace\... => phar://path/to/my.phar/namespace/...
 
7
Q: Difference between object and class in PHP?

dino beytarWhat is the difference between Object and Class in PHP? I ask because, I don't really see the point to both of them. Can you tell me the difference with a good example?

 
\My\Other\Namespace\... => phar://path/to/my.phar/other/...
 
oh , you meant for the loader , not the config
it actually should work by default
 
@tereško lol I knew that. U made it seem that the class was wrong. I know class someObject is a class. but one can make a someOnject object!
 
8:17 PM
11
Q: What is a class in PHP?

StrawberryI'm having serious issues understanding PHP classes from a book. They seem very difficult. What is their purpose and how do they work?

 
just as one can make a Building object in that example u just gave
 
@Neal , you named your class "object"
which is stupid
 
So the class in your example @tereško should have been called BuildingClass according to you?
!
 
according to me, it should not even have a qualifier as suffix
 
Naming a class Building is the same to me as naming it SomeObject
 
8:19 PM
6
Q: Is it called class or object instance?

hakreI have a wording / precision question. Sometimes I write "object instance" sometimes "class instance". Isn't it that an object is always an instance of a class? Therefore "object instance" is not the correct wording, right? Is it common to say so anyway, or just a "mistake" of mine? I have the ...

 
but the point is that you looked at apple and called it "smooth orange"
 
a building is an object name. SomeObject can be an object name
I think ur a lil confused... :-\
 
/me s
 
(or I am)
 
user1125394
$orange = new Apple;
 
8:20 PM
when you define a class you give the name TO THE DAMNED CLASS
not to the object
$objectName = new ClassName;
 
@tereško EXACTLY. the class name is SomeObject. then I want to make a new SomeOject and then another new SomeObject!
look at my example!
 
OBJECT IS NOT A CLASS
 
return new someObject;
 
@Neal You still don't get it...
 
new
 
8:21 PM
$bob = new Human;
 
@Neal: Read this line of code: $someObject = new SomeClass;
 
@hakre ok.
now what?
@ShaquinTrifonoff about this: stackoverflow.com/a/13184469/561731 (in case u came late)
 
$jill = new Bob; would be retarded
 
@Neal What is the name of the class? And what is the name of the object?
 
@tereško Why can jill be a Bob?
...
whatever...
 
8:23 PM
fak this ... of to the ignore list
 
user1125394
@Neal change that class name please
 
@cyril You are not giving me a good reason why.... it was a quick example. no reflection on anything ive done.
 
You name objects and you name classes. But you don't name classes to name objects.
 
@hakre Ahhh haaa, so how would you create a new House object? I can't name the class House apparently
bc a House is an object name
no?
 
bc?
 
8:25 PM
"because"
 
$home = new House();
 
"House" is an abstract idea , ability to think in and recognize abstract concepts is what distinguishes us from other higher primates
 
@hakre again. House is an object name
as is "SomeObject"! @tereško!! I thought I was ignored....
 
$car = new House;
 
Well obviously House is a classname here.
 
8:26 PM
this can be true...
 
@Neal It's class House {, not class HouseObject {.
 
@igorw thx.
 
@ShaquinTrifonoff HOLY NOODLES! so if I named my class class Some { ud all be fine?
 
you've brought shame to our tribe
3
 
23 secs ago, by webarto
you've brought shame to our tribe :P
 
8:27 PM
@hakre and obviously someObject is a classname in my example!
 
It's only consistent with PHP core. See ArrayObject.
/me gets popcorn
 
@Neal Yes, but it's obviously a misnomer.
 
:D
 
@Neal Give it a descriptive name, not Some :P
 
That is what everybody tries to tell you.
 
8:28 PM
@igorw LOL
@ShaquinTrifonoff I did! SomeObject. like House, but it is a SomeObject class!
 
Hello
 
@igorw Because it turns an array into an object ;)
 
@Neal Basically object is the instance not the class itself
 
@PeeHaa I know that
so I can have multiple SomeObject instances!
 
Well then: Naming your class Object is plain stupid
 
8:29 PM
yay
 
Can I have a quick help on my table form please, anyone?
 
like multiple House instances
@PeeHaa Well that is reserved I think...
 
@Neal Okay, if it's about the base facts: A name is a name. You can screw a lot with that, because you can just freely name it as long as the syntax allows it. ;)
 
user1125394
honestly it could have been worse like : class Object {}
 
@hakre lol exactly. so everyone get off my back x_x
 
8:30 PM
his primary language is javascript ... he does not understand that prototypal languages are different from class-based ones .. give it up
 
@Neal Why?
 
@tereško Actually my primary language is English.
 
And now for real: $class = (object) new Object;
 
@PeeHaa never mind.
 
echo "<tr><td>

<td><u><P ALIGN='left'><b><font size='5' color='black'>Login_________________________________________________________________</font></b></P></u></td>

//<form name='form1' method='post' action='send_contact.php'>

<td>Subject</td>
<td>:</td>
<td><input name='subject' type='text' id='subject' size='50'></td>
</td></tr>";
 
8:30 PM
someObject::where(); is not true, and that is it @Neal
 
I get the Login in the same line as the input name=subject
 
@webarto eh? tru. bc where is not static
 
i want the 'Subject' to go below Login in the website, how do I do that?
 
@Neal try it for yourself... it can be accessed statically...
 
@webarto try what?
 
@MirwaisMaarij , CSS spells with two S's and one C, instead of two P's and an H ... you had a typo when you searched for chat room
 
@tereško ^_^
 
okay man, thanks !
 
@MirwaisMaarij By not using the align attribute, <b> and <font> tags, and by not using tables for layout :P
 
user1125394
@Neal @webarto eval.in/2007
 
8:33 PM
I had no idea what to use for layout in php shaquin :p
 
k i gotta go
no trains due to sandy
headin out early
 
so i thought I'd use table, since im new to php I didnt quite know..
 
latr ppl
 
class nealObject
{
  function stahp()
  {
    echo __CLASS__ . ' STAHP!';
  }
}

echo nealObject::stahp();
echo (new nealObject)->stahp();
 
@Neal: You should have pointed to the duplicate question in the first place.
 
8:40 PM
@MirwaisMaarij What do you want it to look like?
 
user1125394
9:00 PM
anyone know if it's possible to revert a merge commit changes
 
user1125394
git revert a6c96748f04f22891dd8834f2486e90bf3507c4a
fatal: Commit a6c96748f04f22891dd8834f2486e90bf3507c4a is a merge but no -m option was given.
 
@cyril git reset?
 
user1125394
will do it by hand
 
user1125394
@PeeHaa I just want to eliminate the changes introduced in a merge done by someone else
 
@cyril the error message already gave you the hint
look at the -m option for git-revert
 
9:04 PM
@cyril , yes it is possible to roll back to a custom commit
 
you need to tell git which side of the merge to revert, I believe it's usually "2"
 
user1125394
thx I'v seen but I'll correct it by hand rather this is just
++<<<<<<< HEAD
+
++=======
++>>>>>>> f18ab344e5e36a8ef8351a2d51c7d98d66ce2759
 
since the first parent of the merge is usually your main branch, i.e. master
 
then again .. we have a guy a 1-vote away from bronze achie .. badge in .. listen to him @cyril
 
user1125394
9:05 PM
ok ;)
 
user1125394
will try it for fun
 
user1125394
oww this is bringing lots of %!#
 
@benlevywebdesign i can give you a collection of designs that i use when i need to make something pretty and ASAP : mediafire.com/?p3evdf35ys3y1nd and mediafire.com/?4a59basyto57xjh (none of those 800+ designs is mine)
 
Congrats, you've gained the privilege – create tag synonyms - Hmm, a very exiting new privilege (not) :P
 
@tereško what it is? Ah, designs... is there HTML or just pretty images?
 
9:13 PM
@webarto a two part archive of web design examples .. jpg/png
 
@tereško kewl, downloading, thanks
 
a guy was showing us this and asking : "why do you keep saying that it is crap?"
4 hours ago, by benlevywebdesign
user image
 
why do i always have problems with naming crap
 
user1125394
9:30 PM
 
so I have seen it with other blogs where they have a different style for images post and video post
how do you do that
 
with css?
 
really, but how do you tell it what type of post it is?
 
with css.
i'm not sure I understand your question
 
for wordpress
 
9:41 PM
ok....
and...
 
I'm new to this wordpress thing
 
so, what's your question?
 
how do you style different post in wordpress like this demo blog does it demo.kreativethemes.com/evolution
 
basically you'd flag the post with an id.
so, video ==1
image==2
etc.
 
ok is there some reference document I can look at?
 
9:45 PM
then, you can identify the post type and apply the appropriate style
no idea
 
I understand what your saying but I don't know how it does it
 
read the wordpress docs
im not sure how it handles that
 
I don't use it much
 
so I should just leave my basic post loop the same
how do I flag a post in my template file?
thats what I'm lost on
 
setting css for different posts wordpress
try searching google
looks like there are a few things there that might help you
 
 
1 hour later…
11:01 PM
@tereško now accepting delete votes.
 
hello, i need help with mysqli not returning results when i use a select with joins
my problem goes when i use $result->fetch_array(MYSQLI_ASSOC)
forget it
 
11:18 PM
hey peeps, correct me, if I'm wrong, but isn't all, that is require for a "microframework" to be complete, just routing and autoloading ?
 
Sorry, I don't totally understand. Do you mean that all that's required for a "microframework" to be complete is routing and autoloading?
 
@tereško and view/template renderer, and some simple DB abstraction (simple PDO wrapper sort of)... IMHO
 
i would question the sanity of people who make "pdo wrappers"
 
bad wording, what I meant is ORM, but no one likes that :)
 
are you saying that if you do not even have ORM, it cannot be a micro-framework?
even though there are people (and i agree) who treat ORMs as anti-pattern ..
 
11:24 PM
wait, what... I'm talking nonsense...
Routing - Do you mean HTTP Request / Response along with URL parsing, etc?
 
yes .. well .. not the response
 
How do you expect to return the content?
Database is not relevant, there are many ORM standalone solutions, and you should know PDO...
IMHO when you add all those things up, it becomes "real" framework... I think micro != simple, and not simple means more code (at least to me)...
 
I'm not aware of any official definitions, but to me a web micro-framework is a sinatra-like route builder.
 
There isn't official definition nor it will/should be, so it is rather pointless to discuss :)
 
11:39 PM
Microframework (n): A small amount of crap. See also Framework (n): A large amount of crap.
16
 
@webarto echo
 
@tereško Yup, in most cases response is just an echo... If you need one, make it yourself. Why not make a list?
 
11:54 PM
sure, if you want to implement your own parsing of $_SERVER inconsistencies or ghasp have 200 front controllers, be my guest ;-)
 
@igorw in what context was this ?
 

« first day (747 days earlier)      last day (4184 days later) »