From 8e41d3b6165ee2dfcc4a934e6ccd7cf1a7aeb501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 3 Sep 2017 14:35:00 +0200 Subject: doc: add PHP plugin in scripting guide --- doc/pl/weechat_scripting.pl.adoc | 51 +++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 11 deletions(-) (limited to 'doc/pl') diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc index 708bd6ebf..02d2d1307 100644 --- a/doc/pl/weechat_scripting.pl.adoc +++ b/doc/pl/weechat_scripting.pl.adoc @@ -29,13 +29,14 @@ i lekkim, zaprojektowanym dla wielu systemów operacyjnych. Ten dokument przedstawia sposób pisania skryptów dla WeeChat z użyciem jednego ze wspieranych języków skryptowych: -* python -* perl -* ruby -* lua -* tcl -* guile (scheme) -* javascript +* Python +* Perl +* Ruby +* Lua +* Tcl +* Guile (Scheme) +* Javascript +* PHP [NOTE] Prawie wszystkie przykłady umieszczone w tym dokumencie są napisane w Pythonie, @@ -80,7 +81,7 @@ Weechat.config_new_option(config, section, "nazwa", "ciąg", "opis opcji", "", 0 * Funkcje są wywoływane za pomocą `weechat::xxx arg1 arg2 ...` -==== Guile (scheme) +==== Guile (Scheme) * Funkcje są wywoływane za pomocą `(weechat:xxx arg1 arg2 ...)` * Następujące funkcje przyjmują pojedynczą listę argumentów (zamiast wielu @@ -94,6 +95,10 @@ Weechat.config_new_option(config, section, "nazwa", "ciąg", "opis opcji", "", 0 * Funkcje są wywoływane za pomocą `weechat.xxx(arg1, arg2, ...);` +==== PHP + +* Funkcje są wywoływane za pomocą `weechat_xxx(arg1, arg2, ...);` + [[register_function]] === Funkcja rejestrująca @@ -166,7 +171,7 @@ weechat::register "test_tcl" "FlashCode" "1.0" "GPL3" "Skrypt testowy" "" "" weechat::print "" "Witaj ze skryptu tcl!" ---- -* Guile (scheme): +* Guile (Scheme): [source,lisp] ---- @@ -178,10 +183,22 @@ weechat::print "" "Witaj ze skryptu tcl!" [source,javascript] ---- -weechat.register("test_js", "FlashCode", "1.0", "GPL3", "Test script", "", ""); +weechat.register("test_js", "FlashCode", "1.0", "GPL3", "Skrypt testowy", "", ""); weechat.print("", "Witaj ze skryptu javascript!"); ---- +* PHP: + +[source,php] +---- +