Welcome, Guest Log In

Class Krai_Markup

Class Overview

Markup generator class

This class currently provides markup generators for <script> tags and <link> tags for javascript and css file inclusion respectively.

Located in /Krai/Markup.php [line 28]



		
				Author(s):
		
API Tags:
Abstract:  

Methods

[ Top ]
Method Summary
static string   JavascriptTag()   Generates javascript tags for some file names
static string   StylesheetTag()   Generates link tags for some stylesheet files

[ Top ]
Methods
static method JavascriptTag  [line 52]

  static string JavascriptTag( $files  )

Generates javascript tags for some file names

This function generates <script> tags for some collection of javascript file names. The files are prefixed with the BASEURI configuration option value and the javascripts directory.

So, for example:

  1.  # This is the BASEURI line in the config file
  2.  BASEURImypath/test
  3.  
  4.  # Get the tags
  5.  Krai_Markup::JavascriptTag(array("file1.js","other/file2.js"));
  6.  # => the <script> tags for /mypath/test/javascripts/file1.js and
  7.                             /mypath/test/javascripts/other/file2.js

Parameters:
array   $files:  An array of file names to generate a tag for

API Tags:
Return:  The tags, concatenated together
Access:  public


[ Top ]
static method StylesheetTag  [line 87]

  static string StylesheetTag( $files, [string $media = "all"]  )

Generates link tags for some stylesheet files

This function generates <link> tags for some collection of stylesheet file names. The files are prefixed with the BASEURI configuration option value and the css directory.

So, for example:

  1.  # This is the BASEURI line in the config file
  2.  BASEURImypath/test
  3.  
  4.  # Get the tags
  5.  Krai_Markup::StylesheetTag(array("file1.css","other/file2.css"));
  6.  # => the <link> tags for /mypath/test/css/file1.css and
  7.                           /mypath/test/css/other/file2.css

Parameters:
array   $files:  An array of file names for which to generate tags
string   $media:  A list of the media to which the files should apply

API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 25 Jul 2008 15:19:36 -0400 by phpDocumentor 1.4.2
Krai Framework site admin credits sitemap valid xhtml?