Labu,
derėtų susikurti HTTP2 klasės instance'ą (new HTTP2(); ..) ir jį naudoti..
2016.12.27 15:39, ejs rašė:
> Laba,
>
> radau keistą situaciją HTTP2.php kode:
>
> veikia:
> public function negotiateLanguage($supported, $default = 'en-US')
> ...
> if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
> $match = HTTP2::matchAccept(
> $_SERVER['HTTP_ACCEPT_LANGUAGE'],
> $supp
> );
> ...
>
> bet neveikia originalas,
> public function negotiateLanguage($supported, $default = 'en-US')
> {
> ...
> if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
> $match = $this->matchAccept(
> $_SERVER['HTTP_ACCEPT_LANGUAGE'],
> $supp
> );
> ...
>
>
> '$this' kažkodėl būdu referr'ina į parent call'ą, t.y
> 'MySite::sortAccept()', bet ne 'HTTP2::sortAccept()'
>
> HTTP2 ką tik pastatytas iš pear'o.
>
> 'MySite' kodas
> function MySite() {
> ...
> $this->lang = HTTP2::negotiateLanguage($langsAvailable);
> ...
>
> Gal bus idėjų?
>