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

Class: MenuLink

Source Location: /myphp-1.9/myphp-1.9-menu/html/page/MenuLink.php

Class MenuLink

Class Overview

Used to View subdirectories via the web This is not considered a hacker tool, because every skilled web developer can do this stuff.

  1. The tool will build a navigation menu reflecting the dir structure
  2. document_root
  3. |- tools
  4. |- source
  5. Usage:
  6. $menulink = new MenuLink($path,$class);
  7. print $menulink->getHtml();
  8. Or
  9. MenuLink::display($path,$class);

Located in /myphp-1.9/myphp-1.9-menu/html/page/MenuLink.php [line 45]

Object
   |
   --Html
      |
      --MenuLink

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Html

Html::$elements
Html::$sizeof

Inherited From Object

Object::$cachefile
Object::$html
Object::$sql

Inherited From Html

Html::Html()
Constructor
Html::add()
Add an element, the number of elements are stored internally in an array.
Html::content()
Read the content of the specified filename
Html::display()
Display the html
Html::get()
Get the complete html for a key
Html::getAttribute()
Get the complete html for an attribute, i.e. <a class="myclass" ...
Html::getElement()
Get the element at position $i in array
Html::getElements()
Get all the elements as html
Html::getHtml()
Get Html
Html::getHtmlHelp()
Get html help
Html::getSizeof()
Get the number of elements added
Html::getTag()
Get the complete html for a html tag, i.e. <p>My paragraph</p>
Html::read()
Read the content of the specified filename and language
Html::set()
Set the named attribute (key) of a class to specified value
Html::setObject()
Set the named object to the class attribute (key), with same name
Html::showsource()
Show source
Html::update()
Save the content of the specified filename and language

Inherited From Object

Object::Object()
Constructor
Object::addHtml()
Add the current html to the SourceCode object
Object::getCacheFileName()
Returns the name of the cache file name
Object::getClassName()
Returns the name of the instanciated class
Object::getHtml()
Returns the html for the element
Object::getMsg()
Get the formatted message and debug level and Log to file ?
Object::save()
Save the SQL cache file
Object::setCacheFileName()
Set the path/name of the cache file
Object::toString()
Returns the information for this class
Object::write()
Write the content to the file opened by fp

[ Top ]
Property Summary
mixed   $class  
mixed   $cwd  
mixed   $dir  
mixed   $path  

[ Top ]
Method Summary
MenuLink   MenuLink()   Constructor
void   display()   Display html
array   getDir()   Returns the directory names in an array If a 'marker' file is found, the full path is used else the basename is used instead
String   getHome()   Get the html for the Home link
String   getHtml()   Get the html, and return it for a View of the Disk
String   getIndicator()   Get the image indicator for a link as html
String   getMenuLink()   Get the html for a link
String   getSpace()   Get the space before a sublink
String   getUp()   Get the html for an 'UP' link
String   getUrl()   Get the url from a path
String   getView()   Get the html, and return it for a View of the Disk
boolean   isChild()   Returns true or false if current path is a child of working directory
boolean   isParent()   Returns true or false if current path is a parent of working directory
boolean   isSibling()   Returns true or false if current path is on the same level of working directory

[ Top ]
Properties
mixed   $class = '' [line 46]

[ Top ]
mixed   $cwd = '' [line 49]

[ Top ]
mixed   $dir = '' [line 48]

[ Top ]
mixed   $path = '' [line 47]

[ Top ]
Methods
Constructor MenuLink  [line 56]

  MenuLink MenuLink( [String $path = ''], [String $class = '']  )

Constructor

Parameters:
String   $path:  The directory path to start from
String   $class:  The CSS class to use


[ Top ]
display  [line 435]

  void display( [String $path = ''], [String $class = '']  )

Display html

  1. Usage:
  2. MenuLink::display($path,$class);

Parameters:
String   $path:  The directory path to start from
String   $class:  The CSS class to use

API Tags:
Static:  


Redefinition of:
Html::display()
Display the html

[ Top ]
getDir  [line 87]

  array getDir( String $path, [String $level = 0]  )

Returns the directory names in an array If a 'marker' file is found, the full path is used else the basename is used instead

Parameters:
String   $path:  The directory path to start from
String   $level:  The directory level

API Tags:
Return:  An array of Directory names or NULL


[ Top ]
getHome  [line 142]

  String getHome( )

Get the html for the Home link


API Tags:
Return:  The html


[ Top ]
getHtml  [line 392]

  String getHtml( )

Get the html, and return it for a View of the Disk


API Tags:
Return:  The html


Redefinition of:
Html::getHtml()
Get Html

[ Top ]
getIndicator  [line 280]

  String getIndicator( String $name  )

Get the image indicator for a link as html

Parameters:
String   $name:  The name of a gif indicator

API Tags:
Return:  The image as an object html


[ Top ]
getMenuLink  [line 309]

  String getMenuLink( String $level, String $name, String $path, [String $indicator = false]  )

Get the html for a link

Parameters:
String   $level:  The directory level
String   $name:  The name of the directory
String   $path:  The path info for the directory
String   $indicator:  The indicator for a parent-child

API Tags:
Return:  The html


[ Top ]
getSpace  [line 197]

  String getSpace( String $level  )

Get the space before a sublink

Parameters:
String   $level:  The directory level

API Tags:
Return:  The space as html


[ Top ]
getUp  [line 154]

  String getUp( )

Get the html for an 'UP' link


API Tags:
Return:  The html


[ Top ]
getUrl  [line 173]

  String getUrl( String $path  )

Get the url from a path

Return i.e. 'adress-find.dk' from C:/Projects/www/virtuelserver/adress-find.dk when the PROJECT_PATH is C:/Projects/www/virtuelserver and the VIRTUEL_SERVER_URL is /www/virtuelserver

Parameters:
String   $path:  The path to convert to an url

API Tags:
Return:  The url


[ Top ]
getView  [line 368]

  String getView( String $dir, [String $level = 0], [mixed $parent = false]  )

Get the html, and return it for a View of the Disk

Parameters:
String   $dir:  An array of directories
String   $level:  The level deep

API Tags:
Return:  The html


[ Top ]
isChild  [line 243]

  boolean isChild( mixed $path  )

Returns true or false if current path is a child of working directory

  1. The following situations may occur
  2. cwd path description
  3. ======================================================
  4. /somedir/test /somedir/test/kontakt path is a child of the cwd


API Tags:
Return:  True if path is a child of cwd


[ Top ]
isParent  [line 219]

  boolean isParent( String $path  )

Returns true or false if current path is a parent of working directory

  1. The following situations may occur
  2. cwd path description
  3. ======================================================
  4. /somedir/katja/kontakt /somedir/katja path is a parent of the cwd

Parameters:
String   $path:  The directory path to test

API Tags:
Return:  True if path is a parent of cwd


[ Top ]
isSibling  [line 264]

  boolean isSibling( String $path  )

Returns true or false if current path is on the same level of working directory

  1. The following situations may occur
  2. cwd path description
  3. ======================================================
  4. /somedir/test/info /somedir/test/kontakt path is a sibling of the cwd

Parameters:
String   $path:  The directory path to test

API Tags:
Return:  True if path is a sibling of cwd


[ Top ]

Documentation generated on Thu, 22 Dec 2005 17:13:24 +0100 by phpDocumentor 1.3.0RC3