[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Can someone explain to me what's the point of this function?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 18
Thread images: 3
File: php.jpg (97 KB, 400x400) Image search: [Google]
php.jpg
97 KB, 400x400
Can someone explain to me what's the point of this function?
    /**
* Normalize data key
*
* Used to transform data key into the necessary
* key format for this set. Used in subclasses
* like \Slim\Http\Headers.
*
* @param string $key The data key
* @return mixed The transformed/normalized data key
*/
protected function normalizeKey($key)
{
return $key;
}


Also, PHP hate thread
>>
>>52013430
>Used to transform data key into the necessary
>* key format for this set. Used in subclasses
>* like \Slim\Http\Headers.
>*
>* @param string $key The data key
>* @return mixed The transformed/normalized data key

can't you read? get a load of this n00b haha
>>
>>52013430
It's clearly a draft, you fgt. Also, fuck php and all the dynamic typing languages that don't offer the option to specify variabls' type at the instantiation. May they all die in a fire.
>>
It may have had a purpose before and was changed and it was easier to change the inside of the function than every place it was called, though the comment should have been updated to match. Or it's a placeholder.
>>
File: feminist.jpg-large.jpg (50 KB, 812x812) Image search: [Google]
feminist.jpg-large.jpg
50 KB, 812x812
identity function, common in functional programming

there are probably places where you pass callbacks and this is the default or something
>>
>>52013560
who is this semen demon?
>>
>>52013519
Look at Mr. Obvious here.

Have you read the function itself.. It doesn't alter the $key in any way, it just returns it as it is passed to the function. It does literally nothing.
>>
>>52013430
The point is you are a shitposter and a faggot of course.

>https://github.com/slimphp/Slim/blob/3.x/Slim/Http/Headers.php#L177
>>
Looks like a stub
>>
>>52013674
This is from 2.x, not from 3.x
>>
>>52013560
she is adorable :3 i'd love to do nasty things to her
>>
I don't know PHP, but possibly overridden in subclasses or something so they can conform to different formats/interfaces?
>>
>>52013692
Not my problem. No link was posted.
>>
>>52013720
I searched through all branches and tags in a repo and it is simillar to what you linked.
I probably accidentally deleted a piece of code in my local fork.
Also this fixes a "bug" I've been trying to fix last 4 days. Thanks anon..
>>
>>52013527
>don't offer the option to specify variabls' type at the instantiation. May they all die in a fire.
I am sad because c++ doesn't allow me to switch the datatype whenever the fuck I want.
$kek=1;
$kek.=" LOL"
echo $kek; //"1 LOL"
$lol=intval($kek);
$lol+=1;
echo $lol; // 2
>>
>>52013788
Damn forgot the semikolon on the end of line 2
>>
File: vomit mei.jpg (117 KB, 650x672) Image search: [Google]
vomit mei.jpg
117 KB, 650x672
>>52013788
>>
>>52013634
The users are expected to override the method in children classes.
PHP does not have an override keyword (yet?)
Thread replies: 18
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.