phpDocumentor default
[ class tree: default ] [ index: default ] [ all elements ]

Procedural File: func.php

Source Location: /func.php

Page Details
Functions
arg_check  [line 396]

boolean arg_check( string $str  )

Argument (cmd) check for program

global $vars; $vars['cmd'] == $str would be enough

Parameters:
string   $str: 


[ Top ]
array_fill  [line 1187]

void array_fill( $start_index, $num, $value  )
Parameters:
   $start_index: 
   $num: 
   $value: 


[ Top ]
auto_template  [line 171]

string auto_template( string $page  )

Get template contents for a new page

Parameters:
string   $page:  the new page

API Tags:
Return:  template contents
Global:  boolean $auto_template_func: use this auto_template function or not
Global:  array $auto_template_rules: the pagename rules to be used as templates. @see pukiwiki.ini.php


[ Top ]
catrule  [line 578]

string catrule( )

Show text formatting rules


API Tags:
Return:  TextFormattingRules html
Global:  string $rule_page: TextFormattingRules page


[ Top ]
check_non_list  [line 153]

boolean check_non_list( [string $page = '']  )

Check if the page is in the non_list

Parameters:
string   $page: 

API Tags:
Global:  string $non_list: the preg definition of non_list (ignore pages). @see pukiwiki.ini.php


[ Top ]
csv_explode  [line 1121]

array csv_explode( string $separator, string $string  )

Explode Comma-Separated Values to an array

Example)

  1.  csv_explode(',''A,"B,B",C'=> array('A','B,B','C')

Parameters:
string   $separator:  separator, usually ','
string   $string:  csv strings

API Tags:
Return:  array of exploded strings
See:  csv_implode()


[ Top ]
csv_implode  [line 1152]

string csv_implode( string $glue, array $pieces  )

Implode an array with CSV data format (escape double quotes)

Example)

  1.  csv_implode(','array('A','B,B','C')) => 'A,"B,B",C'

Parameters:
string   $glue:  seperator, usually ','
array   $pieces: 

API Tags:
See:  csv_explode()


[ Top ]
decode  [line 428]

string decode( string $key  )

Decode page name

hex2bin($key)

Parameters:
string   $key:  encoded string

API Tags:
Return:  decoded string
See:  encode()
Uses:  hex2bin()


[ Top ]
die_message  [line 596]

void die_message( string $msg  )

Show (critical) error message (then exit)

Parameters:
string   $msg: 


[ Top ]
do_search  [line 285]

string do_search( $word, [enum $type = 'AND'], [boolean $non_format = FALSE], [string $base = ''], string $work  )

'Search' main function

Parameters:
string   $work:  search word
enum   $type:  'AND' or 'OR'
boolean   $non_format: 
string   $base: 
   $word: 

API Tags:
Return:  the search result in html
See:  search.inc.php
Uses:  get_search_words()
Uses:  get_existpages
Uses:  auth::check_role


[ Top ]
drop_submit  [line 740]

string drop_submit( string $str  )

Hide <input type="(submit|button|image)"...> to <input type="hidden"...>

Parameters:
string   $str:  target string

API Tags:
Return:  replaced string


[ Top ]
encode  [line 411]

string encode( string $key  )

Encode page-name

strtoupper(bin2hex($key))

Parameters:
string   $key:  a string such as a pagename

API Tags:
See:  decode()


[ Top ]
format_date  [line 685]

void format_date( $val, [ $paren = FALSE]  )
Parameters:
   $val: 
   $paren: 


[ Top ]
generate_trie_regex  [line 838]

void generate_trie_regex( array &$array, [int $offset = 0], [int $sentry = NULL], [int $pos = 0]  )

Generate one compact regex for quick reTRIEval, that just matches with all $array values.

USAGE:

  1.    sort($arraySORT_STRING)// Keys are replaced, as we had expected
  2.    $regex generate_trie_regex($array);

Parameters:
array   &$array:  (_sorted_ _string_ array)
array_keys($array) MUST BE _continuous integers started with 0_.
All $array values MUST BE strings.
Passing the reference, of the $array here, will save the memories,
from flood of recursive call.
int   $offset:  $array[$offset] is the first value to check
int   $sentry:  $array[$sentry - 1] is the last value to check
int   $pos:  Position of the letter to start checking. (0 = the first letter)

Information Tags:
Link:  http://en.wikipedia.org/wiki/Trie

[ Top ]
getmicrotime  [line 637]

float getmicrotime( )

Get the current time in micro sec


API Tags:
Return:  time in micro sec


[ Top ]
get_autoaliases  [line 900]

array get_autoaliases( [string $word = '']  )

Load/get autoalias pairs

Parameters:
string   $word:  alias name

API Tags:
Return:  if $word == '': array whose keys are alias names and values are array of real names
if $word != '': array of real names
Uses:  get_autoaliases_from_autobasealias()
Uses:  get_autoaliases_from_aliaspage()


[ Top ]
get_autoaliases_from_aliaspage  [line 941]

array get_autoaliases_from_aliaspage( )

Load/get AutoAlias pairs from AutoAliasName


API Tags:
Return:  array whose keys are alias names and values are array of real names
Global:  string $aliaspage: AutoAliasName page
Global:  int $autoalias_max_words: maximum number of aliases
Usedby:  get_autoaliases()


[ Top ]
get_autoaliases_from_autobasealias  [line 924]

array get_autoaliases_from_autobasealias( )

Load/get pairs of AutoBaseAlias


API Tags:
Return:  array whose keys are alias names and values are array of real names
Usedby:  get_autoaliases()

Information Tags:
Since:  PukiWiki Plus! 1.4.7plus-u3-i18n or 1.4.8plus-i18n

[ Top ]
get_autoglossaries  [line 987]

array|string get_autoglossaries( [string $word = '']  )

Load/get setting pairs from Glossary

Parameters:
string   $word:  glossary word

API Tags:
Return:  if $word == '': array of whose keys are words and values are their explanations respectively
if $word != '': explanation of the word
Global:  string $glossarypage: Glossary page
Global:  int $autoglossary_max_words: maximum number of glossary words


[ Top ]
get_autolink_pattern  [line 782]

void get_autolink_pattern( &$pages, [ $min_len = -1]  )
Parameters:
   &$pages: 
   $min_len: 


[ Top ]
get_autolink_pattern_sub  [line 885]

void get_autolink_pattern_sub( &$pages, $start, $end, $pos  )
Parameters:
   &$pages: 
   $start: 
   $end: 
   $pos: 


[ Top ]
get_date  [line 654]

void get_date( string $format, [int $timestamp = NULL]  )

Get the date

Example)

  1.  get_date('D, d M Y H:i:s T'get_filetime($_page))

Parameters:
string   $format:  date format
int   $timestamp:  timestamp or current UTIME if not specified


[ Top ]
get_glossary_pattern  [line 746]

void get_glossary_pattern( &$pages, [ $min_len = -1]  )
Parameters:
   &$pages: 
   $min_len: 


[ Top ]
get_passage  [line 719]

string get_passage( int $time, [boolean $paren = TRUE]  )

Get the time passage from the given timestamp to the current time.

The passage format is as 'N seconds/minutes/hours/days/years ago'

Parameters:
int   $time:  timestamp
boolean   $paren:  put () on the both side of the output string

API Tags:
Return:  passage


[ Top ]
get_script_uri  [line 1024]

string get_script_uri( [string $init_uri = '']  )

Get the PukiWiki script URI

Parameters:
string   $init_uri:  Initialize script URI manually if want

API Tags:
Return:  script uri


[ Top ]
get_search_words  [line 205]

void get_search_words( $words, [ $do_escape = FALSE]  )
Parameters:
   $words: 
   $do_escape: 

API Tags:
Usedby:  do_search()


[ Top ]
get_short_pagename  [line 704]

string get_short_pagename( string $fullpagename  )

Get short pagename(last token without '/') or basename

Parameters:
string   $fullpagename: 

API Tags:
Return:  short pagename (or basename)


[ Top ]
get_zonetime_offset  [line 675]

void get_zonetime_offset( $zonetime  )
Parameters:
   $zonetime: 


[ Top ]
hex2bin  [line 439]

string hex2bin( string $hex_string  )

Inversion of bin2hex()

Parameters:
string   $hex_string: 

API Tags:
Usedby:  decode()


[ Top ]
input_filter  [line 1088]

void input_filter( $param  )
Parameters:
   $param: 


[ Top ]
is_a  [line 1170]

void is_a( $class, $match  )
Parameters:
   $class: 
   $match: 


[ Top ]
is_editable  [line 95]

boolean is_editable( string $page  )

Check if the page is editable or not

Parameters:
string   $page: 

API Tags:
Global:  array $cantedit: special pages which can not be edited
Uses:  is_pagename()
Uses:  is_freeze()


[ Top ]
is_freeze  [line 119]

boolean is_freeze( string $page, [boolean $clearcache = FALSE]  )

Check if the page is frozen or not

Parameters:
string   $page: 
boolean   $clearcache:  clear memory cache

API Tags:
Usedby:  is_editable()


[ Top ]
is_interwiki  [line 20]

boolean is_interwiki( string $str  )

Check if the str is interwiki or not

Parameters:
string   $str: 

API Tags:
Global:  string $InterWikiName: Syntax definition of InterWikiName, @see init.php
Uses:  is_url()


[ Top ]
is_page  [line 79]

boolean is_page( string $page, [boolean $clearcache = FALSE]  )

Check if the page exists

Parameters:
string   $page: 
boolean   $clearcache:  clearcache or not

API Tags:
Uses:  get_filename
Uses:  clearstatcache


[ Top ]
is_pagename  [line 33]

boolean is_pagename( string $str  )

Check if the str is pagename or not

Parameters:
string   $str: 

API Tags:
Global:  string $BracketName: Syntax definition of BracketName (or PageName), @see init.php
Usedby:  is_editable()


[ Top ]
is_url  [line 64]

boolean is_url( string $str, [boolean $only_http = FALSE]  )

Check if the str is url or not

Parameters:
string   $str: 
boolean   $only_http:  check only http, and https. Otherwise, check http, https, ftp, and news

API Tags:
Usedby:  is_interwiki()


[ Top ]
md5_file  [line 1199]

void md5_file( $filename  )
Parameters:
   $filename: 


[ Top ]
page_list  [line 475]

string page_list( array $pages, [string $cmd = 'read'], [boolean $withfilename = FALSE]  )

Create list of pages (html)

Parameters:
array   $pages: 
string   $cmd:  cmd used for href
boolean   $withfilename:  print physical filename, too

API Tags:
Return:  page_list html
See:  list.inc.php, filelist.inc.php
Uses:  get_readings - if $pagereading_enable is TRUE
Uses:  get_pg_passage


[ Top ]
sanitize  [line 1104]

void sanitize( $param  )
Parameters:
   $param: 


[ Top ]
sha1  [line 1215]

void sha1( $str  )
Parameters:
   $str: 


[ Top ]
strip_bracket  [line 454]

string strip_bracket( string $str  )

Remove [[ ]] (brackets)

Parameters:
string   $str:  [[pagename]]

API Tags:
Deprecated:  use this function to support PukiWiki 1.3


[ Top ]


Documentation generated on Mon, 09 Jul 2007 16:26:11 +0900 by phpDocumentor 1.3.2