apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: HTML_Template_Flexy_Plugin_Savant

Source Location: /HTML_Template_Flexy-1.3.13/HTML/Template/Flexy/Plugin/Savant.php

Class Overview


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.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 16]
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 program 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.



[ Top ]


Method Detail

ahref   [line 39]

string ahref( string $href, string $text, [string $extra = null])

Output an HTML <a href="">...</a> tag.

Parameters:

string   $href   —  The URL for the resulting <a href="">...</a> tag.
string   $text   —  The text surrounded by the <a>...</a> tag set.
string   $extra   —  Any "extra" HTML code to place within the <a> opening tag.

[ Top ]

checkbox   [line 83]

string checkbox( string $name, mixed $value, [mixed $selected = null], [string $set_unchecked = null], [string $extra = null])

Output a single checkbox <input> element.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public

Parameters:

string   $name   —  The HTML "name=" value for the checkbox.
mixed   $value   —  The value of the checkbox if checked.
mixed   $selected   —  Check $value against this; if they match, mark the checkbox as checked.
string   $set_unchecked   —  If null, this will add no HTML to the output. However, if set to any non-null value, the value will be added as a hidden element before the checkbox so that if the checkbox is unchecked, the hidden value will be returned instead of the checked value.
string   $extra   —  Any "extra" HTML code to place within the checkbox element.

[ Top ]

checkboxes   [line 148]

string checkboxes( string $name, array $options, [ $selected = array()], [string $set_unchecked = null], [string $sep = "<br />\n"], [string $extra = null])

Output a set of checkbox <input>s.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public

Parameters:

string   $name   —  The HTML "name=" value of all the checkbox <input>s. The name will get [] appended to it to make it an array when returned to the server.
array   $options   —  An array of key-value pairs where the key is the checkbox value and the value is the checkbox label.
string   $set_unchecked   —  If null, this will add no HTML to the output. However, if set to any non-null value, the value will be added as a hidden element before every checkbox so that if the checkbox is unchecked, the hidden value will be returned instead of the checked value.
string   $sep   —  The HTML text to place between every checkbox in the set.
string   $extra   —  Any "extra" HTML code to place within the checkbox element.
   $selected   — 

[ Top ]

cycle   [line 246]

string cycle( int $iteration, [array $values = null], [int $repeat = 1])

Cycle through a series of values based on an iteration number, with optional group repetition.

For example, if you have three values in a cycle (a, b, c) the iteration returns look like this:

0 => a 1 => b 2 => c 3 => a 4 => b 5 => c

If you repeat each cycle value (a,b,c) 2 times on the iterations, the returns look like this:

  1. => a
  2. => a
  3. => b
  4. => b
  5. => c
  6. => c

  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public

Parameters:

int   $iteration   —  The iteration number for the cycle.
array   $values   —  The values to cycle through.
int   $repeat   —  The number of times to repeat a cycle value.

[ Top ]

dateformat   [line 281]

string dateformat( string $datestring, [string $format = false])

Output a formatted date using strftime() conventions.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public

Parameters:

string   $datestring   —  Any date-time string suitable for strtotime().
string   $format   —  The strftime() formatting string.

[ Top ]

image   [line 369]

void image( string $src, [string $alt = null], [int $border = 0], [int $width = null], [int $height = null], string $link)

Output an <image ... /> tag.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public

Parameters:

string   $src   —  The image source as a relative or absolute HREF.
string   $link   —  Providing a link will make the image clickable, leading to the URL indicated by $link; defaults to null.
string   $alt   —  Alternative descriptive text for the image; defaults to the filename of the image.
int   $border   —  The border width for the image; defaults to zero.
int   $width   —  The displayed image width in pixels; defaults to the width of the image.
int   $height   —  The displayed image height in pixels; defaults to the height of the image.

[ Top ]

input   [line 461]

string input( string $type, string $name, [mixed $value = ''], [string $extra = ''])

Output a single <input> element.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public
  • License: LGPL

Parameters:

string   $type   —  The HTML "type=" value (e.g., 'text', 'hidden', 'password').
string   $name   —  The HTML "name=" value.
mixed   $value   —  The initial value of the input element.
string   $extra   —  Any "extra" HTML code to place within the checkbox element.

[ Top ]

javascript   [line 490]

string javascript( string $href)

Output a <script></script> link to a JavaScript file.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public
  • License: LGPL

Parameters:

string   $href   —  The HREF leading to the JavaScript source file.

[ Top ]

modify   [line 530]

string modify( string $value, [string $functions = null])

Output a value using echo after processing with optional modifier functions.

Allows you to pass a space-separated list of value-manipulation functions so that the value is "massaged" before output. For example, if you want to strip slashes, force to lower case, and convert to HTML entities (as for an input text box), you might do this:

$this->modify($value, 'stripslashes strtolower htmlentities');

  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public
  • License: LGPL

Parameters:

string   $value   —  The value to be printed.
string   $functions   —  A space-separated list of single-parameter functions to be applied to the $value before printing.

[ Top ]

numberformat   [line 315]

string numberformat( $number, [ $dec = false], [ $point = false], [ $thousands = false], string $datestring, string $format)

Output a formatted number using number_format

Parameters:

string   $datestring   —  Any date-time string suitable for strtotime().
string   $format   —  The strftime() formatting string.
   $number   — 
   $dec   — 
   $point   — 
   $thousands   — 

[ Top ]

options   [line 585]

string options( array $options, [mixed $selected = array()], [ $extra = null])

Output a series of HTML <option>s based on an associative array where the key is the option value and the value is the option label. You can pass a "selected" value as well to tell the function which option value(s) should be marked as seleted.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public

Parameters:

array   $options   —  An associative array of key-value pairs; the key is the option value, the value is the option lable.
mixed   $selected   —  A string or array that matches one or more option values, to tell the function what options should be marked as selected. Defaults to an empty array.
   $extra   — 

[ Top ]

radios   [line 657]

string radios( string $name, array $options, [string $checked = null], [ $set_unchecked = null], [string $sep = "<br />\n"], [string $extra = null])

Output a set of radio <input>s with the same name.
  • Author: Paul M. Jones <pmjones@ciaweb.net>
  • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
  • Access: public

Parameters:

string   $name   —  The HTML "name=" value of all the radio <input>s.
array   $options   — 

An array of key-value pairs where the key is the radio button value and the value is the radio button label.

$options = array (

    1. => 'one',
    2. => 'two'
    );

    string   $checked   —  A comparison string; if any of the $option element values and $checked are the same, that radio button will be marked as "checked" (otherwise not).
    string   $extra   —  Any "extra" HTML code to place within the <input /> element.
    string   $sep   —  The HTML text to place between every radio button in the set.
       $set_unchecked   — 

    [ Top ]

    stylesheet   [line 711]

    string stylesheet( string $href)

    Output a <link ... /> to a CSS stylesheet.
    • Author: Paul M. Jones <pmjones@ciaweb.net>
    • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
    • Access: public

    Parameters:

    string   $href   —  The HREF leading to the stylesheet file.

    [ Top ]

    textarea   [line 749]

    string textarea( string $name, string $text, [int $tall = 24], [mixed $wide = 80], [string $extra = ''])

    Output a single <textarea> element.
    • Author: Paul M. Jones <pmjones@ciaweb.net>
    • Version: $Id: Savant.php 186366 2005-05-14 03:40:14Z alan_k $
    • Access: public
    • License: LGPL

    Parameters:

    string   $name   —  The HTML "name=" value.
    string   $text   —  The initial value of the textarea element.
    int   $tall   —  How many rows tall should the area be?
    mixed   $wide   —  The many columns wide should the area be?
    string   $extra   —  Any "extra" HTML code to place within the checkbox element.

    [ Top ]


    Documentation generated on Mon, 11 Mar 2019 15:59:57 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.