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

Class: SwiftHtml

Source Location: /classes/SwiftHtml.php

Class SwiftHtml

Method Summary
SwiftHtml   __construct()   Creates a new SwiftHtml object.
string   createAtomFeedTag()   Creates and returns an HTML link tag for an ATOM feed.
string   createCanonicalTag()   Creates and returns an HTML link tag for the canonical URL of the web page.
string   createContentTypeTag()   Creates and returns an HTML content type meta tag to describe the document.
string   createDescriptionTag()   Creates and returns an HTML description meta tag with the provided description as it's value.
string   createInputTag()   Creates and returns an HTML input tag with the provided attributes.
string   createJavaScriptTag()   Creates and returns an HTML script tag which links the web page to a specificed JavaScript file.
string   createKeywordsTag()   Creates and returns an HTML keywords meta tag with the provided keywords as it's value.
string   createLinkTag()   Creates and returns an HTML link tag with the specified tag attributes.
string   createMetaTag()   Creates and returns an HTML meta tag with the provided attributes.
string   createOptionTag()   Creates and returns an HTML option tag with the provided attributes.
string   createRSSFeedTag()   Creates and returns an HTML link tag for an RSS feed.
string   createScriptTag()   Creates and returns an HTML script tag of the specified $type and $src.
string   createSelectTag()   Creates and returns an HTML select tag with the provided options and attributes.
string   createShortcutIconTag()   Creates and returns an HTML link tag for a shortcut icon.
string   createStyleSheetTag()   Creates and returns an HTML link tag to the provided stylesheet.
string   createTextAreaTag()   Creates and returns an HTML textarea tag with the provided attributes.
string   createTitleTag()   Creates and returns an HTML title tag with provided title.
string   getHTML5JavaScriptForIE()   Returns a string containing a snippet of HTML/JS code that can be inserted on any web page to ensure HTML5 compatability for MSIE.
string   getJQuery()   Returns a HTML script tag which includes the jquery.js engine into the web page.

[ Top ]
Methods
Constructor __construct  [line 47]

  SwiftHtml __construct( )

Creates a new SwiftHtml object.


API Tags:
Return:  The new SwiftHtml object.
Access:  public


[ Top ]
createAtomFeedTag  [line 112]

  string createAtomFeedTag( string $url, [string $title = null]  )

Creates and returns an HTML link tag for an ATOM feed.

Parameters:
string   $url:  The URL of the ATOM feed.
string   $title:  The name or title of the ATOM feed.

API Tags:
Return:  A HTML compatible link tag.
Access:  public


[ Top ]
createCanonicalTag  [line 131]

  string createCanonicalTag( string $url  )

Creates and returns an HTML link tag for the canonical URL of the web page.

Parameters:
string   $url:  The canonical url.

API Tags:
Return:  A HTML compatible link tag.
Access:  public


[ Top ]
createContentTypeTag  [line 159]

  string createContentTypeTag( [string $charset = null]  )

Creates and returns an HTML content type meta tag to describe the document.

Parameters:
string   $charset:  The charset to use. The default charset UTF-8 will be used otherwise.

API Tags:
Return:  A HTML compatible meta tag.
Access:  public


[ Top ]
createDescriptionTag  [line 140]

  string createDescriptionTag( string $description  )

Creates and returns an HTML description meta tag with the provided description as it's value.

Parameters:
string   $description:  The description content.

API Tags:
Return:  A HTML compatible meta tag.
Access:  public


[ Top ]
createInputTag  [line 256]

  string createInputTag( [string $type = 'text'], [string $name = null], [string $id = null], [string $value = null], [array $attribute_array = null]  )

Creates and returns an HTML input tag with the provided attributes.

Parameters:
string   $type:  The HTML input type. (Default: text)
string   $name:  The name attribute. (Optional)
string   $id:  The ID attribute. (Optional)
string   $value:  The value attribute. (Optional)
array   $attribute_array:  An array of attributes for the HTML input tag, where the key is the name and the value is the value. (Optional)

API Tags:
Return:  A HTML compatible input tag.
Access:  public


[ Top ]
createJavaScriptTag  [line 83]

  string createJavaScriptTag( string $src  )

Creates and returns an HTML script tag which links the web page to a specificed JavaScript file.

Parameters:
string   $src:  The JavaScript file to link/include.

API Tags:
Return:  A HTML compatible script tag.
Access:  public


[ Top ]
createKeywordsTag  [line 150]

  string createKeywordsTag( string $keywords  )

Creates and returns an HTML keywords meta tag with the provided keywords as it's value.

Parameters:
string   $keywords:  The keywords (coma seperated) to use.

API Tags:
Return:  A HTML compatible meta tag.
Access:  public


[ Top ]
createLinkTag  [line 185]

  string createLinkTag( [string $rel = null], [string $href = null], [string $type = null], [string $title = null], [string $media = null], [string $target = null]  )

Creates and returns an HTML link tag with the specified tag attributes.

Parameters:
string   $rel:  The rel attribute. (Optional)
string   $href:  The href attribute. (Optional)
string   $type:  The type attribute. (Optional)
string   $title:  The title attribute. (Optional)
string   $media:  The media attribute. (Optional)
string   $target:  The target attribute. (Optional)

API Tags:
Return:  A HTML compatible link tag.
Access:  public


[ Top ]
createMetaTag  [line 220]

  string createMetaTag( [string $name = null], [string $content = null], [string $http_equiv = null], [string $scheme = null], [string $dir = null], [string $lang = null], [string $xml_lang = null]  )

Creates and returns an HTML meta tag with the provided attributes.

Parameters:
string   $name:  The name attribute. (Optional)
string   $content:  The content attribute. (Optional)
string   $http_equiv:  The http_equiv attribute. (Optional)
string   $scheme:  The scheme attribute. (Optional)
string   $dir:  The dir attribute. (Optional)
string   $lang:  The lang attribute. (Optional)
string   $xml_lang:  The xml_lang attribute. (Optional)

API Tags:
Return:  A HTML compatible meta tag.
Access:  public


[ Top ]
createOptionTag  [line 349]

  string createOptionTag( [string $name = null], [string $id = null], [string $value = null], [ $selected = false]  )

Creates and returns an HTML option tag with the provided attributes.

Parameters:
string   $name:  The name attribute. (Optional)
string   $id:  The ID attribute. (Optional)
string   $value:  Whether this value should be selected. Default = false (Optional)
   $selected: 

API Tags:
Return:  A HTML compatible option tag.
Access:  public


[ Top ]
createRSSFeedTag  [line 122]

  string createRSSFeedTag( string $url, [string $title = null]  )

Creates and returns an HTML link tag for an RSS feed.

Parameters:
string   $url:  The URL of the RSS feed.
string   $title:  The name or title of the RSS feed.

API Tags:
Return:  A HTML compatible link tag.
Access:  public


[ Top ]
createScriptTag  [line 374]

  string createScriptTag( string $type, string $src  )

Creates and returns an HTML script tag of the specified $type and $src.

Parameters:
string   $type:  The type of script (e.g. JavaScript).
string   $src:  The source or URL of an external script document.

API Tags:
Return:  A HTML compatible script tag.
Access:  public


[ Top ]
createSelectTag  [line 317]

  string createSelectTag( [array $option_array = null], [string $name = null], [string $id = null], [Integer $selected_option = -1], string $value  )

Creates and returns an HTML select tag with the provided options and attributes.

Parameters:
array   $option_array:  An array, where array key is the option value and array value is the option label.
string   $name:  The name attribute. (Optional)
string   $id:  The ID attribute. (Optional)
string   $value:  The value of the textarea. (Optional)
Integer   $selected_option:  The index of the $option_array to preset as selected. (Optional)

API Tags:
Return:  A HTML compatible select tag.
Access:  public


[ Top ]
createShortcutIconTag  [line 102]

  string createShortcutIconTag( string $url  )

Creates and returns an HTML link tag for a shortcut icon.

Parameters:
string   $url:  The URL of the shortcut icon.

API Tags:
Return:  A HTML compatible link tag.
Access:  public


[ Top ]
createStyleSheetTag  [line 93]

  string createStyleSheetTag( string $url, [string $media = null]  )

Creates and returns an HTML link tag to the provided stylesheet.

Parameters:
string   $url:  The URL of the stylesheet.
string   $media:  The media type attribute for the HTML link tag.

API Tags:
Return:  A HTML compatible link tag.
Access:  public


[ Top ]
createTextAreaTag  [line 292]

  string createTextAreaTag( [string $name = null], [string $id = null], [string $value = null]  )

Creates and returns an HTML textarea tag with the provided attributes.

Parameters:
string   $name:  The name attribute. (Optional)
string   $id:  The ID attribute. (Optional)
string   $value:  The value of the textarea. (Optional)

API Tags:
Return:  A HTML compatible textarea tag.
Access:  public


[ Top ]
createTitleTag  [line 171]

  string createTitleTag( string $title  )

Creates and returns an HTML title tag with provided title.

Parameters:
string   $title:  The title of the web page.

API Tags:
Return:  A HTML compatible title tag.
Access:  public


[ Top ]
getHTML5JavaScriptForIE  [line 54]

  string getHTML5JavaScriptForIE( )

Returns a string containing a snippet of HTML/JS code that can be inserted on any web page to ensure HTML5 compatability for MSIE.


API Tags:
Return:  A string of HTML/JS code.
Access:  public


[ Top ]
getJQuery  [line 73]

  string getJQuery( )

Returns a HTML script tag which includes the jquery.js engine into the web page.

to ensure HTML5 compatability for MSIE.


API Tags:
Return:  An HTML script tag.
Access:  public


[ Top ]

Documentation generated on Tue, 08 Oct 2013 05:37:16 +0200 by phpDocumentor 1.4.4