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

Class: PluginSonotsMetapage

Source Location: /sonots/metapage.class.php

Class PluginSonotsMetapage

Class Overview

Meta Information of A Page

This class is a structure of meta information(s) of a page.

This class can also be thought as a namespace having collections of functions to obtain page meta information. Use static PluginSonotsMetapage::metaname() for this purpose.

Located in /sonots/metapage.class.php [line 21]



		
				Author(s):
		
		
		API Tags:
Usedby:  PluginSonotsPagelist::PluginSonotsPagelist()

Information Tags:
Version:  $Id: metapage.class.php, v 1.11 2008-07-18 11:14:46 sonots $
License:  GPL v2

Properties

Methods

[ Top ]
Property Summary
string   $date   Modified Date in a date format
int   $depth   Directory tree depth (Relative Depth)
boolean   $exist   Existence
string   $firsthead   First heading string of the page
string   $info   extra information field to be shown in html
boolean   $leaf   Whether leaf on directory tree or not
string   $link   link to be shown in html
string   $linkstr   link string to be shown in link
string   $new   New! (Modified within 1 day or 3 days, etc)
boolean   $newpage   Whether newpage or not
string   $page   Pagename
int   $popular   Popular count
string   $reading   How to read (Kanji) or alias
string   $relname   Relative path from current directory
int   $timestamp   Timestamp
string   $title   TITLE: of the page
array   $toc   Table of Contents (object of PluginSonotsToc)

[ Top ]
Method Summary
static string   date()   Get date format of a timestamp
static int   depth()   Get directory depth of a path
static boolean   exist()   Get existence of a page
static string   filename()   Get local filename of a page
static string|null   firsthead()   Get first headline string of the page
static string   link()   Get link of a page
static string   linkstr()   Get string used in html link
static string   newdate()   Get New! of a page
static boolean   newpage()   Get newpage information of a page
static int   popular()   Get number of popular
static string   reading()   Get reading of a page
static string   relname()   Get relative path of a page (lower path only)
static string   timestamp()   Get timestamp of a page
static string|null   title()   Get TITLE of the page
static PluginSonotsToc   toc()   Get Table of Contents of a page
PluginSonotsMetapage   PluginSonotsMetapage()   constructor
void   gen_date()   Generate modified date property of this page
void   gen_depth()   Generate depth property of this page
void   gen_exist()   Generate exist property of this page
void   gen_filename()   Generate local filename property of this page
void   gen_firsthead()   Generate firsthead property of this page
void   gen_info()   Generate info property of this page
void   gen_leaf()   Generate leaf property of this page
void   gen_link()   Generate link property of this page
void   gen_linkstr()   Generate linkstr property of this page
void   gen_new()   Generate New! property of this page
void   gen_newpage()   Generate newpage property of this page
void   gen_popular()   Generate popular property of this page
void   gen_reading()   Generate reading (how to read Kanji) property of this page
void   gen_relname()   Generate relative name property of this page
void   gen_timestamp()   Generate timestamp property of this page
void   gen_title()   Generate title property of this page
void   gen_toc()   Generate Table of Contents property of this page

[ Top ]
Properties
string   $date [line 58]

Modified Date in a date format


[ Top ]
int   $depth [line 46]

Directory tree depth (Relative Depth)


[ Top ]
boolean   $exist = TRUE [line 82]

Existence


[ Top ]
string   $firsthead [line 124]

First heading string of the page


[ Top ]
string   $info = '' [line 100]

extra information field to be shown in html


[ Top ]
boolean   $leaf [line 76]

Whether leaf on directory tree or not


[ Top ]
string   $link [line 94]

link to be shown in html


[ Top ]
string   $linkstr [line 88]

link string to be shown in link


[ Top ]
string   $new [line 64]

New! (Modified within 1 day or 3 days, etc)


[ Top ]
boolean   $newpage [line 70]

Whether newpage or not


[ Top ]
string   $page [line 28]

Pagename


[ Top ]
int   $popular [line 106]

Popular count


[ Top ]
string   $reading [line 40]

How to read (Kanji) or alias


[ Top ]
string   $relname [line 34]

Relative path from current directory


[ Top ]
int   $timestamp [line 52]

Timestamp


[ Top ]
string   $title [line 118]

TITLE: of the page


[ Top ]
array   $toc [line 112]

Table of Contents (object of PluginSonotsToc)


[ Top ]
Methods
static method date  [line 427]

  static string date( int $timestamp  )

Get date format of a timestamp

Parameters:
int   $timestamp: 

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_date()


[ Top ]
static method depth  [line 376]

  static int depth( string $path  )

Get directory depth of a path

Parameters:
string   $path: 

API Tags:
Access:  public


[ Top ]
static method exist  [line 468]

  static boolean exist( string $page  )

Get existence of a page

Parameters:
string   $page: 

API Tags:
Access:  public


[ Top ]
static method filename  [line 403]

  static string filename( string $page  )

Get local filename of a page

Parameters:
string   $page: 

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_filename()


[ Top ]
static method firsthead  [line 662]

  static string|null firsthead( string $page, [boolean $usecache = true]  )

Get first headline string of the page

Parameters:
string   $page: 
boolean   $usecache:  use toc cache or not

API Tags:
Return:  first heading string or null
Access:  public
Usedby:  PluginSonotsMetapage::linkstr()
Uses:  PluginSonotsToc
Usedby:  PluginSonotsMetapage::gen_firsthead()


[ Top ]
static method link  [line 547]

  static string link( string $page, string $linkstr, string $option  )

Get link of a page

Parameters:
string   $page:  pagename
string   $linkstr:  linkstr
string   $option:  option
  • page : link to page
  • anchor : link to anchor
  • off : no link

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_link()
Uses:  sonots::make_pageanchor
Uses:  sonots::make_pagelink_nopg


[ Top ]
static method linkstr  [line 493]

  static string linkstr( string $page, [string $option = 'relative'], [string $currdir = ''], [boolean $usecache = true]  )

Get string used in html link

Parameters:
string   $page:  pagename
string   $option:  option
  • name|page|pagename|absolute: pagename (absolute path)
  • base|basename : page basename
  • title : TITLE: of page
  • headline|firsthead : The first headline of a page
  • relative|relname : relative pagename from currdir
string   $currdir:  current dir name($currdir is required for relative)
boolean   $usecache:  use cache of Toc or not (used for title and headline)

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_linkstr()
Usedby:  PluginSonotsMetapage::gen_link()
Uses:  PluginSonotsMetapage::title()
Uses:  PluginSonotsMetapage::relname()
Uses:  PluginSonotsMetapage::firsthead()
Uses:  sonots::get_basename


[ Top ]
static method newdate  [line 439]

  static string newdate( int $timestamp  )

Get New! of a page

Parameters:
int   $timestamp: 

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_new()


[ Top ]
static method newpage  [line 455]

  static boolean newpage( string $page  )

Get newpage information of a page

Parameters:
string   $page:  pagename

API Tags:
Access:  public
Uses:  sonots::is_newpage


[ Top ]
static method popular  [line 573]

  static int popular( string $page, string $when  )

Get number of popular

Parameters:
string   $page:  pagename
string   $when:  'total' or 'today' or 'yesterday' or 'recent'

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_popular()


[ Top ]
static method reading  [line 390]

  static string reading( string $page  )

Get reading of a page

Parameters:
string   $page:  pagename

API Tags:
Return:  reading
Access:  public
Usedby:  PluginSonotsMetapage::gen_reading()
Uses:  sonots::get_readings


[ Top ]
static method relname  [line 356]

  static string relname( string $page, [string $currdir = '']  )

Get relative path of a page (lower path only)

Parameters:
string   $page: 
string   $currdir: 

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::linkstr()
Usedby:  PluginSonotsMetapage::gen_relname()


[ Top ]
static method timestamp  [line 415]

  static string timestamp( string $page  )

Get timestamp of a page

Parameters:
string   $page: 

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_timestamp()


[ Top ]
static method title  [line 647]

  static string|null title( string $page, [boolean $usecache = true]  )

Get TITLE of the page

Parameters:
string   $page: 
boolean   $usecache:  use toc cache or not

API Tags:
Return:  TITLE or null
Access:  public
Usedby:  PluginSonotsMetapage::linkstr()
Uses:  PluginSonotsToc
Usedby:  PluginSonotsMetapage::gen_title()


[ Top ]
static method toc  [line 633]

  static PluginSonotsToc toc( string $page, [boolean $usecache = true]  )

Get Table of Contents of a page

Parameters:
string   $page: 
boolean   $usecache:  use toc cache or not

API Tags:
Access:  public
Usedby:  PluginSonotsMetapage::gen_toc()
Uses:  PluginSonotsToc


[ Top ]
Constructor PluginSonotsMetapage  [line 132]

  PluginSonotsMetapage PluginSonotsMetapage( string $page  )

constructor

Parameters:
string   $page: 

API Tags:
Access:  public


[ Top ]
gen_date  [line 196]

  void gen_date( )

Generate modified date property of this page


API Tags:
Access:  public
Uses:  PluginSonotsMetapage::date()


[ Top ]
gen_depth  [line 156]

  void gen_depth( )

Generate depth property of this page


API Tags:
Access:  public
Uses:  detph


[ Top ]
gen_exist  [line 265]

  void gen_exist( )

Generate exist property of this page


API Tags:
Access:  public


[ Top ]
gen_filename  [line 176]

  void gen_filename( )

Generate local filename property of this page


API Tags:
Access:  public
Uses:  PluginSonotsMetapage::filename()


[ Top ]
gen_firsthead  [line 341]

  void gen_firsthead( [boolean $usecache = true]  )

Generate firsthead property of this page

Parameters:
boolean   $usecache: 

API Tags:
Access:  public
Uses:  PluginSonotsMetapage::firsthead()


[ Top ]
gen_info  [line 218]

  void gen_info( [array $order = array()]  )

Generate info property of this page

Parameters:
array   $order:  array of new,date specifying order.

API Tags:
Access:  public


[ Top ]
gen_leaf  [line 256]

  void gen_leaf( boolean $leaf  )

Generate leaf property of this page

leaf can not be determined item by item

Parameters:
boolean   $leaf: 

API Tags:
Access:  public


[ Top ]
gen_link  [line 295]

  void gen_link( [string $optlinkstr = 'relative'], [string $optlink = 'page'], [string $currdir = ''], [boolean $usecache = true]  )

Generate link property of this page

Parameters:
string   $optlinkstr: 
string   $optlink: 
string   $currdir:  computed as default
boolean   $usecache:  use Toc cache or not (used for title and firsthead)

API Tags:
Access:  public
Uses:  PluginSonotsMetapage::linkstr()
Uses:  PluginSonotsMetapage::link()


[ Top ]
gen_linkstr  [line 278]

  void gen_linkstr( [string $optlinkstr = 'relative'], [string $currdir = ''], [boolean $usecache = true]  )

Generate linkstr property of this page

Parameters:
string   $optlinkstr: 
string   $currdir:  computed as default
boolean   $usecache:  use Toc cache or not (used for title and firsthead)

API Tags:
Access:  public
Uses:  PluginSonotsMetapage::linkstr()


[ Top ]
gen_new  [line 207]

  void gen_new( )

Generate New! property of this page


API Tags:
Access:  public
Uses:  PluginSonotsMetapage::newdate()


[ Top ]
gen_newpage  [line 244]

  void gen_newpage( )

Generate newpage property of this page


API Tags:
Access:  public


[ Top ]
gen_popular  [line 308]

  void gen_popular( [string $when = 'today']  )

Generate popular property of this page

Parameters:
string   $when: 

API Tags:
Access:  public
Uses:  PluginSonotsMetapage::popular()


[ Top ]
gen_reading  [line 166]

  void gen_reading( )

Generate reading (how to read Kanji) property of this page


API Tags:
Access:  public
Uses:  PluginSonotsMetapage::reading()


[ Top ]
gen_relname  [line 146]

  void gen_relname( [string $currdir = '']  )

Generate relative name property of this page

Parameters:
string   $currdir: 

API Tags:
Access:  public
Uses:  PluginSonotsMetapage::relname()


[ Top ]
gen_timestamp  [line 186]

  void gen_timestamp( )

Generate timestamp property of this page


API Tags:
Access:  public
Uses:  PluginSonotsMetapage::timestamp()


[ Top ]
gen_title  [line 330]

  void gen_title( [boolean $usecache = true]  )

Generate title property of this page

Parameters:
boolean   $usecache: 

API Tags:
Access:  public
Uses:  PluginSonotsMetapage::title()


[ Top ]
gen_toc  [line 319]

  void gen_toc( [boolean $usecache = true]  )

Generate Table of Contents property of this page

Parameters:
boolean   $usecache: 

API Tags:
Access:  public
Uses:  PluginSonotsMetapage::toc()


[ Top ]

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