Sitellite Application Framework
Class Tree         Index         All Elements

Class: Site

Source Location: Program_Root/Site/Site.php

Class Overview


Site is a class that is used to store information about your site in


Author(s)

Version

  • 2.2, 2002-07-17, $Id: Site.php,v 1.3 2006/12/17 17:12:17 lux Exp $

Copyright

  • Copyright (C) 2001-2003, Simian Systems Inc.

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 86]
Site is a class that is used to store information about your site in

a nice and simple location.The Site class contains 3 pieces of information about your web site, used mainly for input into the Session object. These include the domain name of your site, which must contain at least 2 periods (.) in order to function properly; the web path from the document root of the site, and a 1 or 0 denoting whether or not we're running behind a Secure Socket Layer (SSL).

The nice part about Site though is that you can store any other properties you want to in it on the fly, because PHP allows you to do so without extending the class. This makes Site a nice place to store information you want to maintain throughout your application.

New in 1.2:

  • Added a prefix() method.
New in 1.4:
  • Moved the prefix() method to saf.Site.SitelliteSite instead, since it uses the Sitellite-specific SITELLITE_LEVEL constant.
New in 2.0:
  • All new property names, including $webpath, $adminpath, $docroot, and $appdir. These changes are necessary in order to support sites with code outside of the document root. Note: The old $wwwpath is now an alias to $webpath, $abspath is an alias to $docroot, and $path is an alias to $adminpath. Also, the constructor's parameters have changed.
New in 2.2:
  • Moved SitelliteSite::prefix() to this class and made it a property (the method exists for b/c), so as to consolidate the two packages. SitelliteSite::runmode is also not used any more by SCS, so that "went West" as they say.
  • Added $current property, and site_current ().

1 <?php
2
3 // create a Site object that sits behind SSL
4 $site = new SitelliteSite (array (
5 "domain" => "www.yoursite.com",
6 "docroot" => "/home/yoursite/public_html",
7 "appdir" => "/home/yoursite/public_html",
8 "webpath" => "/",
9 "adminpath" => "/sitellite",
10 "secure" => 1,
11 ));
12
13 // output the site's url
14 echo $site->url;
15
16 ? >




Tags:

access:  public
version:  2.2, 2002-07-17, $Id: Site.php,v 1.3 2006/12/17 17:12:17 lux Exp $
license:  http://www.sitellite.org/index/license
copyright:  Copyright (C) 2001-2003, Simian Systems Inc.
author:  John Luxford <mailto:lux@simian.ca>


[ Top ]


Class Variables

$adminpath =

[line 109]

Contains the path to the admin system from the document root.



Tags:

access:  public

Type:   mixed


[ Top ]

$appdir =

[line 126]

Contains the absolute path to the application directory (allows Sitellite to live outside of the $docroot).



Tags:

access:  public

Type:   mixed


[ Top ]

$current =

[line 163]

The path of the web site, which is essentially the webpath, but also including everything but the ?parameters and #anchor.

Created during the construction of the object.




Tags:

access:  public

Type:   mixed


[ Top ]

$docroot =

[line 117]

Contains the absolute path to the document root.



Tags:

access:  public

Type:   mixed


[ Top ]

$domain =

[line 93]

Contains the domain of the site.



Tags:

access:  public

Type:   mixed


[ Top ]

$prefix =

[line 153]

The path of the web site, which is essentially the webpath.

Created during the construction of the object.




Tags:

access:  public

Type:   mixed


[ Top ]

$secure =

[line 135]

A 1 or 0 (true or false) denoting whether the site is running behind SSL.



Tags:

access:  public

Type:   mixed


[ Top ]

$url =

[line 144]

The url of the web site, including the 'http://' or 'https://', the domain, and the webpath. Created during the construction of the object.



Tags:

access:  public

Type:   mixed


[ Top ]

$webpath =

[line 101]

Contains the path of the site from the document root.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor Site [line 174]

Site Site( mixed &$params, string $domain, string $path, boolean $secure)

Constructor method.



Tags:

access:  public


Parameters:

string   $domain  
string   $path  
boolean   $secure  

[ Top ]

method prefix [line 222]

string prefix( [object $tpl = ''])

Returns the $site->webpath if a $conf['Site']['level'] value is defined as greater than 0, otherwise returns ''. NOTE: DEPRECATED.



Tags:

access:  public


Parameters:

object   $tpl  

[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:19:30 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2