« first day (526 days earlier)      last day (4425 days later) » 
00:00 - 20:0020:00 - 00:00

user895378
@ObvioustrollisPeeHaa Wait, you mean PeeHaa isn't Dutch for "All your are belong to us?"
 
3:34 AM
Sup ladies
 
4:01 AM
what do you guys make of this? stackoverflow.com/questions/9856476/diffrent-file-for-diffrent-user/9856947
 
4:21 AM
@rdlowrey Are you here?
 
user895378
yup
 
What did you decide about project structure?
 
user895378
I haven't :) I've just been doing what I had until we decided on however we wanted it to be
 
user895378
Like you said, the autoloader is the only issue with having submodules
 
@rdlowrey Heh, thanks for the backup on that comment thread.... Can you believe that guy?
 
4:23 AM
Okay, I actually can't talk now. Thought I could. Be back as soon as possible.
 
user895378
@LeviMorrison Whatev, I'll probably be around for an hour or so at least. We'll get it worked out
 
user895378
@JaredMark Yeah, that was ridiculous. If he's asking that question it's clear he doesn't know what he's doing already, so to upbraid you like that ... well ... he got a downvote from me for it
 
I think my analogy was well-deserved... dude's obviously a complete database and scripting noob, and he's trying to make forum software?
His question was like someone saying: "Hey, i'm trying to build this race car... where does the propeller go?"
 
user895378
I agree with you. But people don't know what they don't know.
 
Sometimes the most compassionate thing you can do is tell someone they're in over their head, and that they ought to seek out shallower water.
 
user895378
4:27 AM
I just assume that anyone asking a question that broad shouldn't be doing it. If you don't have the slightest idea where to start, you're better served doing a lot more research/learning and then returning to the problem later.
 
Well, I disagree somewhat. If the question had been "HOW do I store forum thread data?" rather than "how do I create new files on my web server to store forum thread data"... then I would have been a lot more understanding.
One is seeking direction, the other has already chosen a direction and is asking how to accomplish that (misguided) goal...
 
5:25 AM
Anybody familiar with Text Diff and getting a character level diff report with respective positions in the text?
http://stackoverflow.com/questions/9848907/php-get-a-diff-report-with-positions-of-insertions-in-text
 
 
1 hour later…
6:28 AM
can anybody please provide me a good example usage of php filter_var functions
right now i am using prepared statements,so i can not see their actual good usage
 
7:10 AM
filter_var and SQL don't spring to mind as two things used commonly together
I use the former to validate user input, but not to escape special chars for any db
 
8:08 AM
@fluty , check is email mails address is actually email
 
8:34 AM
i think even for checking email filter_val is not suffiicient
 
i mean filter_val does not cover all the cases to check if email is valid as much as can be covered up with regular expression
 
you are full of shit
of course, unless you can show a false positive or false negative made by that filter
 
and you have lost your manners to talk....
anyway i got my answer from here ,stackoverflow.com/questions/3406473/… ...
 
 
2 hours later…
10:48 AM
yay .. rep: 5555 points
 
I have a question about solving the session fixation hack method. Is it a good idea instead of generation a new SID using session_regenerate_id() for every script that uses sessions, to genarate a session id only on login and then to memorise into the session file the hashed session id an the only to check from script to script if the session id matches the hashed session id inside of the session file ?
 
12:27 PM
@sorin Generating a new session id for every request makes it harder to do an fixation attack although it also makes it harder for you (the dev) to keep track of the session ids. I believe facebook regenerates a new session id for every request
 
@ObvioustrollisPeeHaa I understand what you mean and so I don't want to regenerate the session id for every script, I want to hash the session id and insert it into the session the to check on every script that needs sessions, if the session id == whit the memorised session id inside of the session. I hope you understand what I'm trying to do, and I want to know if it is worth ?
 
@sorin I don't get the hashing of the session id. I don't see the use.
Session id's generated by session_regenerate_id() are already unique and random
 
Well I don't know if I am wrong or not but if the transfer between the server and the user pc is using the http protocol I am thinking to send hashed (session_id) to the server
 
@sorin And then what?
 
12:42 PM
Here is where I need some help because i not sure if I'm doing the right thing ?
@ObvioustrollisPeeHaa
@tereško Could you tell me your opinion about the ideea with session fixetion ?
 
no comment (or more like "no clue, and too lazy to check if i know it by some other name")
 
@PeeHaa WTF? Sure the question isn't well-phrased, but it seems obvious what he wants.
 
@Christian that question is wrong for several reasons. Besides the fact that there are three tags of different languages (yay polling) it IS NOT clear what OP wants to do
@Christian And it doesn't show any effort doing some research
 
1:08 PM
Would be better if you told that to the OP instead just cv-ing
 
Doesnt session_regenerate_id() gen a new id and keep those session variables intact, so if someone managed to get hold of the cookie holding session id then they would also have to be on that exact page and if they refresh then a new id is regenerated but guessing the page the user was on would be a bit tricky too i guess, keeping a track of ip could also help
 
 
1 hour later…
2:32 PM
that guy needs to learn some PHP basics first - by doing, not by asking.
 
3:05 PM
@fluty I actually use email addresses that look like a@b for intranet work. And yes, I still make sure they entered it correctly. It's not really a bug, more of a gotcha.
filter_var is extremely under-used.
It's really nice when determining if something coming from a user is an integer or a boolean.
I use those two all the time.
For instance, any valid value for a checked box or radio button can easily be determined to be true, and you don't have to remember when the value is 1, or On, or so forth.
 
hey there
 
3:28 PM
:)
Break any builds lately?
 
nah
I don't break builds :P
Only the german docs build is broken, but that's normal :)
 
what does this "cv-pls" and such mean?
 
3:43 PM
0
Q: Splitting up data in the form "xxx-yyyy people" into two variables php

CJSGiven that I have a variable $peopleSize in the format (I've already extracted the information from the UI element): xxx-yyyy people For example as seen in the jquery range UI: http://jsfiddle.net/methuselah/SLvtx/1/ How would I get the two min and max as two seperate variables using PHP get...

Why do regex answers always get the votes? :(
 
user895378
@JaredMark means "close-vote please" ... it's people saying, "this question needs to be closed, please help out with a close vote if you agree"
 
ahh, I was kinda putting 2 and 2 together to figure that out, since most of the ones tagged as such in here had already been closed. :)
and they were all terri-bad questions
 
user895378
Yeah, we've got a bit of what I would call a "close-vote mafia ring" in this room. A couple of guys have even created a chrome plugin that notifies us when someone adds a cv-pls message. It's helpful for zapping the bad questions.
 
user895378
Since there are so many ... particularly in the tag
 
LOL, I totally get ya there...
@salathe I like the answer with the "explode" function usage... :)
that's what I was thinking when I first saw the question...
 
3:49 PM
@JaredMark you do?
 
well yeah, if it's a consistent format of XXX-YYYY for a min-max thing...
why not explode that? :)
simple and easier to use than a regex :)
I like your answer too, though!
More than 1 way to skin a cat. :)
 
I guess people tend towards the fancier ways of doing things because that's what they get taught, my first reaction (unlike everyone else's it seems) was the simplest way I could think of to do it. Why bother with regexes and arrays when you don't have to? :)
 
I hate regular expressions... and I avoid them as a general rule.
 
I use them a lot, probably too often. :P
 
but I have used implode/explode quite extensively in the past... so maybe it's just me being comfortable with them that made me think "Yeah, that's appropriate" :)
well, I think a lot of people like to kinda publicly stroke their e-peen about how uber-awesome-wonderful-smart they are, by showing off with regular expressions.
 
3:53 PM
Yeah that's what I was trying to say, people automatically post what they're most comfortable/familiar with.
 
:)
what do you guys think of this guy's question: stackoverflow.com/questions/9856476/…
 
I think folks using sscanf() must have a bigger e-peen ;)
2
 
I have never even HEARD of that. :0
:-p
 
@rdlowrey Hello.
 
user895378
@LeviMorrison 'morning
 
3:58 PM
Holy crap there's a lot of stupid people in the world...
And you guys have dedicated yourselves to cleaning up their droppings! Kudos. :)
 
@rdlowrey Thoughts on directory structure?
 
user895378
@LeviMorrison I'm sitting here staring at it right now, actually
 
So, there are two simple facts I am considering.
Fact 1: Autoloading should be simple.
Fact 2: Submodules need to be self-contained.
 
user895378
I'm on board with both of those.
 
So how do we get them to play together?
 
user895378
4:04 PM
Along those lines I was thinking ...
 
hey guys
anyone familiar with youtube api?
2
Q: Fetch 3 Last video from youtube channel

epic_syntaxUsing Youtube API, I've created class for my needs. (It works with Zend FW) class youtube extends html { var $yt, $user; public function __construct($user) { require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata_YouTube'); $this->yt = new Zend_Gda...

 
user895378
Since the submodules are self-contained, would it be terrible for each submodule to register its own autoloader? I mean basically each submodule has its own bootstrap file that you just include if you want to use the submodule?
 
user895378
Or even further, if a submodule is simple and has a limited number of files that are always used it wouldn't even need an autoloader: the requisite files could just be required by the bootstrap.
 
user895378
That allows us to break out of the super-nested dir structure to maintain them all in the same namespace format
 
user895378
Of course, it would be more efficient if all the submodules could function off of one autoloader. I don't see how to do that without making all the submodules nest their source code in the same directory structure format, though.
 
4:11 PM
Artax/
   Log/
      DatabaseLogger.php
   Http/
      Router.php
      Request.php
 
any german in here?
 
Nein
 
user895378
@LeviMorrison So how do you structure the unit-tests in that format?
 
Artax/
   Log/
      DatabaseLogger.php
   Http/
      Router.php
      Request.php
      RouterTest.php <-- Only on dev/test branch.
 
user895378
So on the master branch we'd have a .gitignore that wildcards out anything ending in *.Test.php?
 
4:16 PM
That could work.
 
user895378
I haven't done a lot of complex branching/merging so I'm kind of thinking out loud :)
 
@rdlowrey , you create another directory branch which mirrors the main code
 
waiting for answer...
 
src/
   Artax/
tests/
   Artax/
@epic_syntax who cares
 
user895378
@tereško that's how we have it structured right now ... we're thinking about changing it though
 
4:20 PM
@rdlowrey , for what purpose ?
 
@tereško The issue is if you really want submodules:
 
user895378
we want to use git submodules for standalone packages
 
Artax/
   Log/ <-- its own repo
      DatabaseLogger.php
   Http/ <-- its own repo
      Router.php
      Request.php
 
@tereško not u'r business. pro's will answer it
 
user895378
@tereško lol you n00b ... if you were a pro you'd know youtube api
2
 
4:21 PM
@rdlowrey , well .. you could create a separate repository with test
 
Branching would be easier . . .
 
you have repo for code , and repo for tests , another repo for module/package another for test od that module
@LeviMorrison , your version sounds like maintenance nightmare
on other hand
 
user895378
With branching I guess each submodule repo would need its own dev/test branch and the main repo that contained all the submodules wouldn't even need a dev/test branch if all functionality were self-contained in submodules?
 
src/
   Artax/
      Log/ <-- its own repo
         DatabaseLogger.php
      Http/ <-- its own repo
         Router.php
         Request.php
tests/
  Artax/
      Log/ <-- its own repo
        DatabaseLoggerTest.php
      Http/ <-- its own repo
         RouterTest.php
         RequestTest.php
 
@tereško You just doubled the number of repositories. How is that better than a branch?
By the way, that's an honest question.
 
4:26 PM
@LeviMorrison , how is this worse then polluting source tree ?
 
@tereško Because you have to add and maintain more repositories.
 
then dont
softlink the folder
what you suggest is scattering tests all over the codebase
and then hope that you did not mess up with commits
 
They aren't scattered, they are located by the thing they test. I guess I don't understand how that is a problem if they only exist on a dev/test branch.
Perhaps git submodules are currently more work than they are worth.
 
user895378
Well, the current directory structure solves all of those issues ... it just requires a slightly modified autoloader
 
user895378
These are basically the same problems I was running into that led me to the current setup
 
4:33 PM
But how do you know when to check the src folder?
 
user895378
But as it is now, everything is covered by a single, universal autoloader and you only need a single repo for each submodule (that contains both tests and src)
 
user895378
spl_autoload_register(function($cls) {
    if (0 === strpos($cls, 'Artax\\')) {
        $core = ['Events', 'Handlers', 'Ioc'];
        $pkg  = explode('\\', $cls)[1];
        $pkg  = in_array($pkg, $core) ? 'Core' : $pkg;
        $cls  = str_replace('\\', '/', $cls);
        require AX_SYSDIR . "/$pkg/src/$cls.php";
    }
});
 
user895378
This is what it does now, though the structure of the Core libs could be modified so the in_array check isn't even necessary if the Core libs were turned into their own submodule
 
btw, you do not need the $cls = str_replace('\\', '/', $cls); line ... people keep it out of politeness
 
Artax/Http/Routing/Router.
 
user895378
4:35 PM
@tereško You told me that the other day ... I was amazed ... it's still a comfort thing for me right now :)
 
i know the sentiment
 
hi
 
user895378
@LeviMorrison That's why all submodules would need the same directory structure ... if you look at the Log submodule you'll see that structure
 
It's too deep . . .
 
user895378
I don't love it, but it's the only way I've been able to reconcile the submodules with a single autoloader
 
4:38 PM
@rdlowrey looks like you're having some fun with autloloaders and unit tests?
 
user895378
@GordonM Not really, it's more trying to figure out how best to use git submodules and maintain a directory structure that still allows a single autoloader
 
Artax/Http/Routing/Router:

/
   Artax/
      Http/ <--submodule
         src/
            Routing/
               Router.php
 
user895378
It doesn't make sense to me to have a namespace folder (Artax) outside the src/ directory ...
 
user895378
because that's the only reason why the Artax folder exists in the first place ... to be part of the namespace tree
 
But duplicating it inside makes sense? It doesn't to me.
 
user895378
4:41 PM
But I don't think you are duplicating it
 
Artax/Http/Routing/Router:

/
   Artax/
      Http/ <--submodule
         src/
            Artax/
               Http/
                  Routing/
                     Router.php
That seems like a wtf to me.
 
How do I create an in-chat tag here?
 
Why not just Artax/Http/Routing/Router.php?
 
@JaredMark [tag: name] <- remove the space between the : and name.
 
user895378
@LeviMorrison But that's not the current structure
 
user895378
4:41 PM
Right now its:
 
user895378
/
   Http/ <--submodule
      src/
         Artax/
            Http/
            Routing/
               Router.php
 
@rdlowrey . . . I'm looking at it in the repo . . . unless you have a non-pushed structure . . .
 
user895378
There's no Artax top level directory
 
Hm, I think I watched your repo on github. Gonna take a peek.
 
user895378
4:43 PM
Each directory inside the main repo is just a submodule link to a full component with its own src/ and test/ trees
 
user895378
(or it would be, the core libs aren't currently structured that way)
 
user895378
And the main repo is just a container for submodules with nothing of its own
 
That's still a lot of extra Artax and submodule named folders.
 
user895378
I agree with you there :)
 
Maybe lets just scrap the git submodule idea.
lol
It seemed nice, but I just don't like where it is going.
 
user895378
4:45 PM
Well now I've grown to really like them :)
 
user895378
To me, the two extra directories needed are a small sacrifice to have the submodule functionality
 
From what little I've seen of what you guys are working on they sound like they're more trouble than they're worth...
That's just me though
 
user895378
Hehe, they may be :)
 
user895378
I've spent more time fussing with submodule directory structures than writing code for the project over the last couple of days
 
user895378
You're just explicitly putting the submodules into the Artax/Submodule namespace with the extra directories and allowing one autoloader to handle all conceivable submodule components
 
4:49 PM
I'm currently trying to keep stuff as simple as possible with mine. Maybe will start using branches and the like later if I find them useful, but just using the basics for now. github.com/gordiansolutions/reefknot
How about an autoloader class that you can create multiple instances of for different configurations? That's what I'm doing.
 
user895378
Well, ideally, I'd like to have a single autoloader to avoid having to blow through a queue of a bunch of autoloaders for each class load
 
user895378
@LeviMorrison I'm okay with nixing submodules, though, if you want to. I can't figure out any other way to maintain the submodules (simply) without the extra dirs
 
user895378
The extra directories do solve all of the problems as far as I can tell
 
@rdlowrey Okay. I've decided that at this point I will work with whatever you like. Decide, and I'll commit to it.
That way we can get to work.
I really need to get more progress on my project I'm building with Artax :)
 
user895378
I, too, get tired of endless academic discussion and would like to actually write some code
 
user895378
4:58 PM
Well, to get an idea how other people have done it I looked at the Symfony directory structure ... they actually have deeper nesting to get to their components and they aren't even using submodules
 
Well, we can do submodules then :)
 
user895378
Okay, sorry for the protracted discussion. If a better solution comes up it's not that difficult to migrate to it.
 
So, symphony has a hugely nested directory structure without submodules AND they have to have a separate test directory.
Either of our solutions is better than theirs.
 
user895378
Yeah, it looks like a nightmare to me
 
user895378
5:03 PM
Which is why I got behind the extra dir solution because that one concession makes everything really easy
 
user895378
Also, with this structure we're able to have more than just:
 
Wow, Symfony is rather jam packed...
 
user895378
Submodule/
   src/
   test/
   docs/
   etc/
 
user895378
you aren't limited to just src/ and test/
 
GODS BELOW !!
 
user895378
5:05 PM
@GordonM Yes. They could've benefited from a few days of planning before adding 1000 libs
 
i went thought a bit of codeigniter current code
 
user895378
@tereško Are you okay? Do you need to see a doctor? Oh the horror
 
and i have lost any last resemblance of respect for people who promote it
 
user895378
Is CI on github?
 
it is
https://github.com/EllisLab/CodeIgniter.git
if you dig deep enough , the code is PHP4 with a lot of eval()
 
user895378
5:08 PM
And that's actually maintained and backed by a "development" company? Yikes.
 
user1385191
if ($this->config->item('enable_query_strings') === TRUE AND isset($_GET[$this->config->item('controller_trigger')]))
 
user1385191
KILL IT KILL IT KILL IT
 
yes , its as much "opensource" as mysql is
 
user1385191
there's so much inline code
 
LOL
 
user895378
5:11 PM
CodeIgniter is like the cro-magnon to Wordpress's neanderthal ... it's not 100% incapable of cognitive functioning, just 99%
 
function &DB($params = '', $active_record_override = NULL)
{
   // -- snip
         if (($dns = @parse_url($params)) === FALSE)
   // -- snip

        if ( ! class_exists('CI_DB'))
        {
            eval('class CI_DB extends CI_DB_active_record { }');
        }
    // -- snip
}
this is from CI
 
I'm looking at the CI autoloader just now.
I put a lot of effort into paring my autoloader down to the bare essentials and in building it in such a way that it can be easily extended through subclassing.
The CI one is comedy gold.
 
user895378
@GordonM github link please? :)
 
To my autoloader or the CI one?
@ter
 
user895378
yes
 
5:14 PM
@GordonM and it returns a reference of an object
 
@tereško The @ operator and eval in the same method? That's almost genius in how bad it is.
 
user895378
@GordonM Actually just the CI autoloader, I already know how to get to yours :)
 
@GordonM , now go to reddit's /r/PHP and search "framework"
 
user895378
OMG a 1250 line autoloader? LOL.
 
user895378
5:17 PM
You could write a micro-framework in 1250 lines.
 
The core of my autoloader amounts to about 10 lines of executable code.
It started off around 30, and I worked hard to pare it down...
 
Ya know, I'm no PHP expert by any means... not even a "programming" expert... but somehow I feel like I'm stuck in this place...
Almost like I'm in this vortex of looking for questions I can answer... and finding that I am either too stupid about stuff to know the right answer, or that the questions asked are too stupid to bother answering... :)
 
yeah ... the last part is common for the most of people
 
Although, I shouldn't say "too stupid"... I'm plenty smart... There's just a lot that I have yet to learn. :)
 
5:24 PM
when you get 2000 reputation , you gain the ability you vote for closing the stupid ones
@JaredMark , just find a question that seems related to subject you are interest in , do some research and write an answer
 
@tereško It's 2000 now? It was 3k when I pushed to get that amount.
 
helping others is a really good way to learn
@LeviMorrison , maybe 3000 .. i could be wrong
 
@rdlowrey Epic.
 
:)
well, yeah, I actually took about 7 years away from the IT profession to become certified to teach math and social sciences... so I'm a trained educator... just kinda behind on the technology side of things. :)
 
user895378
@LeviMorrison So I'll get the core libs into their own submodule(s) today.
 
5:31 PM
http://stackoverflow.com/questions/9861986/get-earliest-year-from-multiple-tables/9862045#comment12573083_9862045

Why do people comment on the original post, saying the same thing I said in my answer, and not give an upvote for my answer?
 
@JaredMark , if you find some extremely stupid topic, you can past it here , by adding (close vote , please) in front of link ( thats [tag : cv-pls] without spaces)
 
thanks @tereško
already figured that much out, but i appreciate the primer. :)
 
you might notice that there are quite few of such links : cvbacklog.gordon-oheim.biz
actually , this serves better to illustrate : chat.stackoverflow.com/search?q=cv-pls&room=11
 
Yeah, saw that on the right side of the chat here... :)
 
Hmm
I was wondering
How do I substitute get_class($this) in a static context?
 
user895378
5:45 PM
@Christian This answer may help you: stackoverflow.com/a/506737/895378
 
Hmm, get_called_class doesn't always work as intended in my case :/
Man I can't believe I'm going over this mess again :(
 
what did you break again ?
 
@tereško I was rewriting some code.
I remember the old code had this LSB issue and eventually I thought "fck LSB...I'll just keep track of class name myself"
So there's like 50 LOC which does absolutely nothing.
The problem is, since that time, I can't remember what was going wrong.
 
i would say that the main problem with you get_class() is that there actually is a static scope in the first place
 
@tereško I've been trying to eradicate that as well.
 
5:51 PM
anyway
can you make a testcase which shows the problem ?
 
OK, between singleton and static calls, which one is less ugly?
 
Both are pretty nasty.
But I'd lean towards Singleton being worse.
 
@GordonM Oh? ok..
 
@Christian , you are presenting people with "which way you want to die : burned alive or skinned"
 
@tereško I'd say burned. But I get your point. :)
 
5:53 PM
the result does not really change
make a testcase
 
ok
 
there are situations where singleton actually is the lesser of evil
this is not a "spit on finger and check the wind" sort of issue
 
@tereško OMG
 
Nevermind it doesn't work right now
My problem is getting the application to the view, without having the application instantiate the views itself.
Hmm. Now that I think about it, the instantiation requirement is stupid...
The application should be instantiating the view...
With that in place, there's no need for a static function named url
In the view, I just do: $this->app->url();
On the other hand, how do I get the application to construct the view without having to rely on a naming convention?
The only way would be to have the view return its own class name...
class MyView {

}

return 'MyView';
 
6:09 PM
problem is not in the get_called_class()
it is the fact that you want to use the $this
 
@tereško Yeah, but that came with me wanting to write a testcase without actually looking at my realcase ;)
Anyway, problem solved. :)
 
hell , i have no idea from which end to grab it
 
Well, I'm still stung with the problem of not being able to get PHPDoc to recognize 'modules' I add at runtime, without having to rely on static classes / functions.
The problem is that loads of people are quick to judge static calls as the wrong solution (which is true) but do not provide a similar solution.
DI has this bad habit (feature?) that you can't extend it at runtime.
Actually, don't reply to my earlier messages. I'm going to post a question about my issue. This is a tough issue to address in just chat.
 
Isn't that the whole point of DI? That you can substitute any service with any other that implements the same interface at any time?
 
user895378
It's a non-trivial amount of work (to do it correctly), but you can implement a pluggable event system to add event listeners dynamically at runtime for extendablity. In that way you're able to reap the benefits of DI as well as dynamic runtime behavior.
 
dont forget to add some context (in form of code) and explain what the problem is that this code is trying to solve
 
@tereško I always do (in SO questions) ;)
@GordonM Yes, but it is not discoverable. More on this in my question...
 
7:12 PM
Wow.
Really.
0
Q: Avoiding static calls while keeping framework discoverable

ChristianI've stumbled upon an issue which have been hitting me back for 6 months. Basically, as some of you may know, I've been working on my own PHP framework. The "first working version" of the framework worked well, but relied heavily on static method calls. Something many knowledgeable developers c...

I still think it's not well-phrased. :(
OK, should be slightly better.
 
7:30 PM
@Christian If your main worry is the IDE being able to help you out, then type-hinting and annotating the code with docblocks would help.
Netbeans, for example, can work out what kind of class or interface you need to pass into methods that type hint the class or method. It can also work out what to expect the method to give you back in response if you set a @return in the docblock.
 
@GordonM I'm already doing that.
But it won't work any more when methods are added dynamically.
Or otherwise, I would have to change the core class each time I add an extension to the framework.
Say, for example I decide to add URL rewriting capability (via routing) to the framework, I will have to change MyFramework class to have router() method.
In my older system, I just added the Router class in the framework extensions folder, and simply used it directly in my code: Router::route('/apples', array($this, 'handleApples'));
I remember I had something working using functions in my framework's namespace. That part worked well:
namespace MyFramework;

function router($newRouter=null){
    static $router = null;
    if($newRouter)$router = $newRouter;
    if(!$router)$router = new DefaultRouter;
    return $router;
}
But I did not get much reviews about this system.
Hmm, come to think of it, I should mention that as a potential answer.
 
@Christian , is there a different word for "discoverable" ?
because it makes no sense to me in that context
 
self-documented
plays well with type-hinting
 
Does anyone know if i need to send the order info to the quote session before saveOrder() in Magento?
Im trying to send the order info to the onepage class but get error (cc type mismatch)
even though i put in a real CC number
 
7:47 PM
This is more of a PHP channel than a Magento one ;)
 
@boruch , magento has really big and friendly IRC channel
this place is neither
2
.. emm .. who ever started stared previous line : are you aware that it will make no sense out of context ?
 
I think you meant "starred"?
 
@tereško do you know where is it?
 
@boruch on FreeNode server
 
@tereško You should give him username/captcha while at it.
 
7:59 PM
@boruch looks like this :
 
00:00 - 20:0020:00 - 00:00

« first day (526 days earlier)      last day (4425 days later) »