From 1c17adf96bd165b6676852f3b0efaf7137897059 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 2 Mar 2009 16:44:32 +0000 Subject: documentation --- README | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'README') diff --git a/README b/README index b3594a0..419822f 100644 --- a/README +++ b/README @@ -100,7 +100,7 @@ it_text - Translation support ----------------------------- it_text finds the best language to use from browser and override settings. It then reads texts.php in the format documented in the constructor. You can then -use T() to translate a label. Unknown labels are logged in text_log. +use T() to translate a label. Unknown labels are reported using it::error() Example: echo T('hello') . ' ' . Q($customer->name); @@ -158,15 +158,17 @@ Example: it::imageconvert('in' => "src.jpg", 'out' => "dst.jpg", 'size' => "80x80"); Functions: - it::match($pattern, $subject, $opts) -- find pattern in subject using opts; return matches - it::replace($replace, $subject, $opts) -- replace patterns in subject; return result - it::error($info) -- print or mail error message - it::fatal($info) -- print or mail error message, then exit - it::bail($message) -- print message to stderr, exit with errcode - it::exec($command, $values) -- execute command, return output - it::getopt($usage) -- parse (or print) usage, return options, - it::gets() -- fetch next line from stdin or named arg - it::imageconvert($params) -- Convert image using ImageMagick convert + it::match($pattern, $subject, $opts) -- find pattern in subject using opts; return matches + it::replace($replace, $subject, $opts) -- replace patterns in subject; return result + it::error($info) -- print or mail error message + it::fatal($info) -- print or mail error message, then exit + it::bail($message) -- print message to stderr, exit with errcode + it::exec($command, $values) -- execute command, return output + it::getopt($usage) -- parse (or print) usage, return options, + it::gets() -- fetch next line from stdin or named arg + it::imageconvert($params) -- Convert image using ImageMagick convert + it::log($fn, $data, $data...) -- Append data (separated by tabs) to log/$fn-$date + it::map($expr, $array) -- Apply php expression to array members & return -- cgit v1.2.3