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

Class: Referer

Source Location: /myphp-1.9/myphp-1.9-util/html/component/Referer.php

Class Referer

Class Overview

The Referer object.

Retrieves the REFERER, and remote domain and search phrases

  1. Usage:
  2. $referer = new Referer();
  3. $referer->logAll(); // Just log it
  4. print $referer->getHtml(); // show info
  5. Or
  6. Referer::log();
  7. Or
  8. Referer::display();

Located in /myphp-1.9/myphp-1.9-util/html/component/Referer.php [line 37]

Object
   |
   --Html
      |
      --Referer

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
String   $domain  
String   $phrase  
String   $referer  

[ Top ]
Method Summary
Referer   Referer()   Constructor
void   display()   Display html
String   getDomainKey()   Get a hint of the search key word for a particular search engine
String   getDomainName()   Get the domain name from an url if the $url is i.e.
String   getHtml()   Builds the html for a Referer and builds the keyword to get
String   getSearchPhrase()   Get the search phrase from the query
void   log()   Log all
void   logAll()   Log all
void   logDomain()   Logs the domain name from where the user came from
void   logPhrase()   Logs the phrase what the user searched for
void   logReferer()   Logs the referer where the user came from and searched for domain+phrase

[ Top ]
Properties
String   $domain = '' [line 42]

[ Top ]
String   $phrase = '' [line 47]

[ Top ]
String   $referer = '' [line 52]

[ Top ]
Methods
Constructor Referer  [line 57]

  Referer Referer( )

Constructor



[ Top ]
display  [line 266]

  void display( )

Display html

  1. Usage:
  2. Referer::display();


API Tags:
Static:  


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

[ Top ]
getDomainKey  [line 129]

  String getDomainKey( String $domain  )

Get a hint of the search key word for a particular search engine

if the query is ?q=web+expert&author=finn returns 'q'

Parameters:
String   $domain:  The domain name from the referer

API Tags:
Return:  The domain name


[ Top ]
getDomainName  [line 195]

  String getDomainName( String $url  )

Get the domain name from an url if the $url is i.e.

http://www.finn-rasmussen.com/somedir/index.html returns 'finn-rasmussen.com'

Parameters:
String   $url:  The url, to extract the domain name from

API Tags:
Return:  The domain name


[ Top ]
getHtml  [line 224]

  String getHtml( )

Builds the html for a Referer and builds the keyword to get


API Tags:
Return:  The result as html


Redefinition of:
Html::getHtml()
Get Html

[ Top ]
getSearchPhrase  [line 165]

  String getSearchPhrase( String $query, [String $domain = '']  )

Get the search phrase from the query

if the query is ?q=web+expert&author=finn returns 'web expert'

Parameters:
String   $query:  The query from the referer
String   $domain:  The domain name from the referer

API Tags:
Return:  The domain name


[ Top ]
log  [line 253]

  void log( )

Log all

  1. Usage:
  2. Referer::log();


API Tags:
Static:  


[ Top ]
logAll  [line 76]

  void logAll( )

Log all



[ Top ]
logDomain  [line 85]

  void logDomain( )

Logs the domain name from where the user came from



[ Top ]
logPhrase  [line 98]

  void logPhrase( )

Logs the phrase what the user searched for



[ Top ]
logReferer  [line 111]

  void logReferer( )

Logs the referer where the user came from and searched for domain+phrase



[ Top ]

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