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

Class: PluginSonotsPagelist

Source Location: /sonots/pagelist.class.php

Class PluginSonotsPagelist

Class Overview

Page List Class

Located in /sonots/pagelist.class.php [line 17]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Id: pagelist.class.php,v 1.4 2008-07-15 07:23:17Z sonots $
License:  GPL v2

Properties

Methods

[ Top ]
Property Summary
array   $metapages   array of PluginSonotsMetapage(s)

[ Top ]
Method Summary
static string   display_navi()   Prev Next Navigation
static array   get_prevnext()   Get prev next intervals
PluginSonotsPagelist   PluginSonotsPagelist()   constructor
string   display_pages()   Get HTML of page list
void   gen_metas()   Generate the specific meta infomration to pages
mixed   get_meta()   Get a specific meta information
array   get_metas()   Get the specific meta informations of pages
void   grep_by()   Grep out metapages by speific fields
array   init_metas()   Initialize the specific meta informations of metapages
void   map_metas()   Applies the callback to the specific meta informations of metapages
boolean   pad_dirnodes()   Pad non existing dir nodes to construct hierarchical tree
int   sizeof()   sizeof
void   slice()   Slice metapages
void   sort_by()   sort metapages by a meta

[ Top ]
Properties
array   $metapages = array() [line 24]

array of PluginSonotsMetapage(s)


[ Top ]
Methods
static method display_navi  [line 282]

  static string display_navi( array $interval, array $entire, string $basehref, [string $cssclass = '']  )

Prev Next Navigation

Parameters:
array   $interval:  array($start, $end) current showing interval
array   $entire:  array($start, $end) entire interval
string   $basehref:  base href
string   $cssclass: 

API Tags:
Return:  html
Access:  public
Uses:  PluginSonotsPagelist::get_prevnext()

Information Tags:
Version:  $Id: v 1.1 2008-06-07 07:23:17Z sonots $

[ Top ]
static method get_prevnext  [line 320]

  static array get_prevnext( array $current, [array $entire = array(NULL, NULL)]  )

Get prev next intervals

Example)

  1.   $current array(310)// 3rd to 10th
  2.   list($prev$nextget_prevnext($current);
  3.   // array(-5, 2), array(11, 18)
  4.   $entire array(1100);
  5.   list($prev$nextget_prevnext($current$entire);
  6.   // array(1, 2), array(11, 18)

Parameters:
array   $current: 
array   $entire:  use if you want to assure entire interval

API Tags:
Return:  array($prev, $next)
Access:  private
Usedby:  PluginSonotsPagelist::display_navi()

Information Tags:
Version:  $Id: v 1.1 2008-06-07 07:23:17Z sonots $

[ Top ]
Constructor PluginSonotsPagelist  [line 34]

  PluginSonotsPagelist PluginSonotsPagelist( array $pages  )

constructor

Parameters:
array   $pages: 

API Tags:
Access:  public
Uses:  PluginSonotsMetapage

Information Tags:
Version:  $Id: v 1.0 2008-06-07 07:23:17Z sonots $

[ Top ]
display_pages  [line 261]

  string display_pages( [string $cssclass = '']  )

Get HTML of page list

Parameters:
string   $cssclass:  css class

API Tags:
Return:  list html
Access:  public

Information Tags:
Version:  $Id: v 1.0 2008-06-07 07:23:17Z sonots $

[ Top ]
gen_metas  [line 73]

  void gen_metas( string $metakey, [array $args = array()]  )

Generate the specific meta infomration to pages

Parameters:
string   $metakey:  meta information name
array   $args:  if arguments required to set meta information

API Tags:
Access:  public

Information Tags:
Version:  $Id: v 1.0 2008-06-07 07:23:17Z sonots $

[ Top ]
get_meta  [line 101]

  mixed get_meta( int $key, string $metakey  )

Get a specific meta information

Parameters:
int   $key:  page hash array key
string   $metakey:  meta information name

API Tags:
Access:  public

Information Tags:
Version:  $Id: v 1.0 2008-08-15 07:23:17Z sonots $

[ Top ]
get_metas  [line 114]

  array get_metas( string $metakey  )

Get the specific meta informations of pages

Parameters:
string   $metakey:  meta information name

API Tags:
Return:  metas
Access:  public

Information Tags:
Version:  $Id: v 1.0 2008-06-07 07:23:17Z sonots $

[ Top ]
grep_by  [line 248]

  void grep_by( string $meta, string $func, mixed $pattern, [boolean $inverse = FALSE]  )

Grep out metapages by speific fields

Parameters:
string   $meta:  name of meta information to be greped
string   $func:  func name
  • preg : grep by preg
  • ereg : grep by ereg
  • mb_ereg : grep by mb_ereg
  • prefix : remains if prefix matches (strpos)
  • mb_prefix: (mb_strpos)
  • eq : remains if equality holds
  • ge : remains if greater or equal to
  • le : remains if less or equal to
mixed   $pattern: 
boolean   $inverse:  grep -v

API Tags:
Access:  public

Information Tags:
Version:  $Id: v 1.0 2008-06-07 07:23:17Z sonots $

[ Top ]
init_metas  [line 60]

  array init_metas( string $metakey, mixed $value  )

Initialize the specific meta informations of metapages

Parameters:
string   $metakey:  meta information name
mixed   $value:  initialization value

API Tags:
Return:  metas
Access:  public


[ Top ]
map_metas  [line 127]

  void map_metas( string $metakey, callback $callback  )

Applies the callback to the specific meta informations of metapages

Parameters:
string   $metakey:  meta information name
callback   $callback: 

API Tags:
Access:  public


[ Top ]
pad_dirnodes  [line 146]

  boolean pad_dirnodes( string $prefix  )

Pad non existing dir nodes to construct hierarchical tree

Example) A A A/A => A/A B/B B(non exist) B/B

Parameters:
string   $prefix:  current path (need to create relname)

API Tags:
Return:  some intances were added or not
Access:  public

Information Tags:
Version:  $Id: v 1.1 2008-06-07 07:23:17Z sonots $

[ Top ]
sizeof  [line 47]

  int sizeof( )

sizeof


API Tags:
Access:  public


[ Top ]
slice  [line 185]

  void slice( int $offset, mixed $length  )

Slice metapages

Parameters:
int   $offset: 
mixed   $length:  int or NULL (means forever)

API Tags:
See:  array_slice
Access:  public

Information Tags:
Version:  $Id: v 1.0 2008-06-07 07:23:17Z sonots $

[ Top ]
sort_by  [line 199]

  void sort_by( string $meta, [boolean $reverse = false]  )

sort metapages by a meta

Parameters:
string   $meta:  meta name
boolean   $reverse:  sort in reverse order

API Tags:
Access:  public

Information Tags:
Version:  $Id: v 1.2 2008-06-10 07:23:17Z sonots $

[ Top ]

Documentation generated on Sat, 16 Aug 2008 15:27:32 -0400 by phpDocumentor 1.3.2