[pLog-svn] r5812 - plog/trunk/class/template/templatesets
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Wed Aug 8 16:43:27 EDT 2007
Author: oscar
Date: 2007-08-08 16:43:27 -0400 (Wed, 08 Aug 2007)
New Revision: 5812
Modified:
plog/trunk/class/template/templatesets/templatesets.class.php
plog/trunk/class/template/templatesets/templatesetstorage.class.php
Log:
Marked static methods as really static and private ones as really private.
Modified: plog/trunk/class/template/templatesets/templatesets.class.php
===================================================================
--- plog/trunk/class/template/templatesets/templatesets.class.php 2007-08-08 20:38:01 UTC (rev 5811)
+++ plog/trunk/class/template/templatesets/templatesets.class.php 2007-08-08 20:43:27 UTC (rev 5812)
@@ -79,8 +79,9 @@
* available.
*
* @return Returns an array of strings with the name of the template sets
+ * @static
*/
- function getGlobalTemplates()
+ static function getGlobalTemplates()
{
$config =& Config::getConfig();
@@ -98,8 +99,9 @@
*
* @return An array of string containing the identifiers of the template
* sets available for the given blog
+ * @static
*/
- function getBlogTemplates( $blogId )
+ static function getBlogTemplates( $blogId )
{
lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$blogs = new Blogs();
@@ -163,8 +165,9 @@
* Returns true if the template is a valid global template set, or false otherwise.
*
* @param templateName The name of the template.
+ * @static
*/
- function isTemplate( $templateName )
+ static function isTemplate( $templateName )
{
$config =& Config::getConfig();
$templates = $config->getValue( "templates" );
@@ -180,8 +183,9 @@
*
* @param templateName The name of the template.
* @param blogId The identifier of the blog we'd like to check
+ * @static
*/
- function isBlogTemplate( $templateName, $blogId )
+ static function isBlogTemplate( $templateName, $blogId )
{
lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$blogs = new Blogs();
Modified: plog/trunk/class/template/templatesets/templatesetstorage.class.php
===================================================================
--- plog/trunk/class/template/templatesets/templatesetstorage.class.php 2007-08-08 20:38:01 UTC (rev 5811)
+++ plog/trunk/class/template/templatesets/templatesetstorage.class.php 2007-08-08 20:43:27 UTC (rev 5812)
@@ -37,8 +37,9 @@
* as a custom template for the given blog.
*
* @return Returns a string with the path to the folder.
+ * @static
*/
- function getTemplateFolder( $templateName, $blogId = 0 )
+ static function getTemplateFolder( $templateName, $blogId = 0 )
{
$config =& Config::getConfig();
$baseFolder = $config->getValue( "template_folder" );
@@ -61,7 +62,7 @@
* @return The folder where templates are stored, according to our configuration
* @static
*/
- function getBaseTemplateFolder()
+ static function getBaseTemplateFolder()
{
$config =& Config::getConfig();
@@ -77,7 +78,7 @@
* @return The template in disk where templates are being stored
* @static
*/
- function getBlogBaseTemplateFolder( $blogId )
+ static function getBlogBaseTemplateFolder( $blogId )
{
$config =& Config::getConfig();
$baseFolder = $config->getValue( "template_folder" );
@@ -93,8 +94,9 @@
* Recursively removes a folder from disk.
*
* @return True if successful or false otherwise.
+ * @private
*/
- function _removeFolder( $folderName )
+ private function _removeFolder( $folderName )
{
// if the folder does not even exist, let's not even bother trying... It
// could be that it was manually removed by the user or something!
@@ -109,7 +111,7 @@
/**
* @private
*/
- function _removeTemplateFromArray( $array, $key )
+ private function _removeTemplateFromArray( $array, $key )
{
$resultArray = Array();
foreach( $array as $elem ) {
@@ -278,8 +280,9 @@
* @param blogId the identifier of the blog to which we're going to install
* the new template.
* @return True if successful or false otherwise.
+ * @static
*/
- function addLocalTemplate( $templateName, $blogId )
+ static function addLocalTemplate( $templateName, $blogId )
{
$blogs = new Blogs();
$blog = $blogs->getBlogInfo( $blogId );
@@ -352,7 +355,7 @@
*
* @return a path
*/
- function getAdminTemplateFolder()
+ static function getAdminTemplateFolder()
{
$templatePath = TemplateSetStorage::getBaseTemplateFolder()."/admin";
@@ -366,7 +369,7 @@
* @para pluginId
* @return At path
*/
- function getPluginTemplateFolder( $pluginId )
+ static function getPluginTemplateFolder( $pluginId )
{
$templateFolder = "./plugins/".$pluginId."/templates/";
@@ -418,8 +421,9 @@
* available for the template
*
* @return a url
+ * @static
*/
- function getNoScreenshotUrl()
+ static function getNoScreenshotUrl()
{
$config =& Config::getConfig();
$baseUrl = $config->getValue( "base_url" );
@@ -434,7 +438,7 @@
* @return path
* @static
*/
- function getMiscTemplateFolder()
+ static function getMiscTemplateFolder()
{
$templatePath = TemplateSetStorage::getBaseTemplateFolder()."/misc";
return $templatePath;
More information about the pLog-svn
mailing list