Location: PHPKode > projects > EUrl the Easy URL Generator > EUrl/doc/main_page_documentation.php
<?php

/**
 * @brief Stores the Main Page documentation
 *
 * <PRE>
 *
 * EUrl - The Easy URL Generator
 * Copyright (C) 2005 Jason Schmidt
 *
 * To contact Jason Schmidt, you may send mail to one of the following
 * addresses.  Please note these may change in the future, but every
 * effort will be made to actively forward messages to the new
 * address(es):
 *
 * hide@address.com
 *
 * Jason Schmidt
 * 6245 Newberry Road 102
 * Indianapolis, Indiana 46256-3103
 * United States of America
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * </PRE>
 *
 * @author Jason Schmidt
 *
 * @file main_page_documentation.php
 *
 * @version       $Revision: 1.1 $
 *
 * @date          $Date: 2005/05/31 18:24:27 $
 */

/**
 * @section howto HOWTO use EUrl
 *
 * The most important thing to know is that there is one magic
 * function you want.  EUrl::Generate().  Here are the two ways you
 * can use it:
 *
 * @code
 * $url = EUrl::Generate();
 *
 * $MyEurl = new EUrl();
 * $url = $MyEurl->Generate();
 * @endcode
 *
 * Both versions go through the same list of possible inputs for
 * creating the URL, with the exception of the statically-called
 * version not checking instantiated variables (as that call method is
 * non-instantiated).
 *
 * To build the URL, the Generate() function goes through (what has
 * become) a large list of data sources.  The first data source that
 * it finds with a value which is NOT NULL, it will use and ignore all
 * others.
 *
 * @ref scope Skip to the ordered list of data sources
 *
 * In short, it searches for your input first, and then spirals
 * outward to find anything from the environment that it can.  This
 * gives you LOTS of options for usage.  One of my personal favorites
 * is setting up mod_rewrite rules in apache, and assigning an
 * environment variable to make output URLs match the rewrite rule.
 * This is a very powerful tool for those obsessed with Search Engine
 * Optimization.  Here is an example rewrite rule:
 *
 * <PRE>
 *
 * RewriteEngine On
 * RewriteRule ^/~user$      /~user/HelloWorld.php    [PT]
 * RewriteRule ^/~user/(.*)$ /~user/HelloWorld.php/$1 [PT]
 * &lt;Files HelloWorld.php&gt;
 *     SetEnv EURL_VAR_INDEX_PATH /~user
 * &lt;/Files&gt;
 *
 * </PRE>
 *
 * Now if you visit yoursite.com/~user, you'll get the HelloWorld.php
 * file, and yet all the links generated from within the
 * HelloWorld.php file will appear to be linking directly to
 * yoursite.com/~user/...
 *
 * @section var Definition of internal variables used to make a URL:
 *
 * @li EURL_VAR_PROTOCOL       - Required: http,https,ftp,gopher,etc...
 * @li EURL_VAR_USER           - Optional
 * @li EURL_VAR_PASS           - Optional: Requires EURL_VAR_USER
 * @li EURL_VAR_DOMAIN         - Required: /^.*\....$/
 * @li EURL_VAR_SUB_DOMAIN     - Optional: /^.*\.$/ Requires EURL_VAR_DOMAIN
 * @li EURL_VAR_PORT           - Optional: /^\\d*$/
 * @li EURL_VAR_INDEX_PATH     - Optional: /^\/.*$/
 * @li EURL_VAR_PATH_WITH_KEYS - Required: Boolean
 * @li EURL_VAR_PATH_VARS      - Optional: Array(Key=>Value...)
 * @li EURL_VAR_FILE_NAME      - Optional: String file name
 * @li EURL_VAR_GET_VARS       - Optional: Array(Key=>Value...)
 * @li EURL_VAR_FRAGMENT       - Optional: String fragment
 *
 * @section scope Scope list (traverses from first to last, first wins):
 *
 * @li EURL_SCOPE_PARAMETERS   - EUrl::Generate(Array(EURL_VAR_*=>...))
 * @li EURL_SCOPE_SETTINGS     - EUrl->SetValue(EURL_VAR_*,*)
 * @li EURL_SCOPE_GLOBAL       - $GLOBALS[EURL_VAR_*]
 * @li EURL_SCOPE_DEFAULTS     - EUrl::SetValue(EURL_VAR_*,*)
 * @li EURL_SCOPE_CONSTANTS    - EURL_VAL_*
 * @li EURL_SCOPE_ENVIRONMENT  - $GLOBALS["_ENV"]
 * @li EURL_SCOPE_MINING       - $GLOBALS[...][...]...
 * @li EURL_SCOPE_INTERNAL     - Internal default fall-backs
 *
 * @section constant User settable constants (all are optional):
 *
 * @li EURL_VAL_PROTOCOL
 * @li EURL_VAL_USER
 * @li EURL_VAL_PASS
 * @li EURL_VAL_SUB_DOMAIN
 * @li EURL_VAL_DOMAIN
 * @li EURL_VAL_PORT
 * @li EURL_VAL_INDEX_PATH
 * @li EURL_VAL_PATH_WITH_KEYS
 * @li EURL_VAL_FRAGMENT
 *
 * @section environment User settable environment variables (all are optional):
 *
 * @li EURL_ENV_PROTOCOL
 * @li EURL_ENV_USER
 * @li EURL_ENV_PASS
 * @li EURL_ENV_SUB_DOMAIN
 * @li EURL_ENV_DOMAIN
 * @li EURL_ENV_PORT
 * @li EURL_ENV_INDEX_PATH
 * @li EURL_ENV_PATH_WITH_KEYS
 * @li EURL_ENV_FRAGMENT
 *
 * @mainpage EUrl: The Easy URL Generator
 */

?>
Return current item: EUrl the Easy URL Generator