Subversion Repositories PHPX

Compare Revisions

Last modification

Ignore whitespace Rev 70 → Rev 71

/trunk/View.php
150,8 → 150,8
}
 
/**
* Adds a CSS resource (stylesheet) to the list of external
* stylesheets
* Adds an CSS resource (stylesheet)
* to the list of external stylesheets
*
* @param string $uri
* Stylesheet URI
158,6 → 158,8
* @param mixed $key (optional)
* Array key for the script. May be used later to exclude
* or include the code for a specific stylesheet.
* @return array
* The list of stylesheets
*/
public function addStylesheet ($uri, $key = null)
{
171,12 → 173,35
{
$stylesheets[] = $uri;
}
 
return $stylesheets;
}
 
/**
* Adds an ECMAScript resource (script) to the list of external
* scripts
* Adds several CSS resources (stylesheets)
* to the list of external stylesheets
*
* @param array $uris
* Stylesheet URIs
* @return array
* The list of stylesheets
*/
public function addStylesheets (array $uris)
{
$stylesheets = $this->_stylesheets;
 
foreach ($uris as $uri)
{
$stylesheets = $this->addStylesheet($uri);
}
 
return $stylesheets;
}
 
/**
* Adds an ECMAScript resource (script)
* to the list of external scripts
*
* @param string $uri
* Script URI
* @param mixed $key (optional)
195,9 → 220,32
{
$scripts[] = $uri;
}
 
return $scripts;
}
 
/**
* Adds several ECMAScript resources (scripts)
* to the list of external scripts
*
* @param array $uris
* Script URIs
* @return array
* The list of scripts
*/
public function addScripts (array $uris)
{
$scripts = $this->_scripts;
 
foreach ($uris as $uri)
{
$scripts = $this->addScript($uri);
}
 
return $scripts;
}
 
/**
* Renders the view by including a template
*
* @param string $template
/trunk/Controller.php
92,14 → 92,32
 
/**
* (non-PHPDoc)
* @see View::addStylesheets()
*/
protected function addStylesheets (array $uris)
{
return $this->_view->addStylesheets($uris);
}
 
/**
* (non-PHPDoc)
* @see View::addSscript()
*/
protected function addScript ($uri, $key = null)
{
return $this->_view->addScript ($uri, $key);
return $this->_view->addScript($uri, $key);
}
 
/**
* (non-PHPDoc)
* @see View::addSscripts()
*/
protected function addScripts (array $uris)
{
return $this->_view->addScripts($uris);
}
 
/**
* Renders the {@link View} associated with this controller
* by including the <code>View</code>'s template.
* <code>Controller</code>s should call this method instead of