Source for file SkillSet.php

Documentation is available at SkillSet.php

  1. <?php
  2. /* -------------------------------------------------------------------------- */
  3. /* Module      : SkillSet                                                     */
  4. /*                                                                            */
  5. /* Version History :                                                          */
  6. /*                                                                            */
  7. /* Date        Vsn     Author          Description                            */
  8. /* -------------------------------------------------------------------------- */
  9. /* 17/02/09    1.0     S.Lindo         Initial version.                       */
  10. /* -------------------------------------------------------------------------- */
  11. /**
  12.  * The skills used to display the current view are listed here.
  13.  * 
  14.  * @package Default
  15.  */
  16. class Zend_View_Helper_SkillSet extends Zend_View_Helper_Abstract
  17. {
  18.     /**
  19.      * @return string Formatted skillset used to create the view
  20.      */
  21.     public function skillSet()
  22.     {
  23.         $skillSet null;
  24.  
  25.         $path=APPLICATION_PATH '/config/skillset/' $this->view->controllerName '/';
  26.         $fileName $this->view->actionName;
  27.         $fullFileName $path $fileName '.xml';
  28.  
  29.         if file_exists($fullFileName) )
  30.         {
  31.             // Double quotes used to prevent display of the '\n' & '\t' chars.
  32.             $skillSet "\n<div class=\"skillset_description\">
  33.                              \n\t<p class=\"skillset_description_header\">This page illustrates the following skills :</p>
  34.                                 \n\t<ul class=\"bullet\">";
  35.             $config new Zend_Config_Xml ($fullFileName);
  36.             foreach ($config->skills as $skill)
  37.             {
  38.                 $skillSet .= "\n\t\t<li class=\"bullet\">" $skill "</li>";
  39.             }
  40.  
  41.             $skillSet .= "\n\t</ul>
  42.                           \n</div>\n";
  43.  
  44.         }
  45.  
  46.         return $skillSet;
  47.     }
  48.  
  49.  
  50.  
  51.     public function demoDescription()
  52.     {
  53.         if ($this->view->pageSkillSet == null)
  54.         {
  55.             $demoDescription "";
  56.  
  57.         else {
  58.  
  59.             $demoDescription "\n<div class=\"demo_description\">
  60.                                 \n\t<p class=\"demo_description_header\">This page illustrates the following skills :</p>
  61.                                 \n\t<ul class=\"demo\">";
  62.  
  63.             foreach ($this->view->pageSkillSet as $skill)
  64.             {
  65.                 $demoDescription .= "\n\t\t<li class=\"demo\">" $skill "</li>";
  66.             }
  67.             $demoDescription .= "\n\t</ul>
  68.                                  \n</div>\n";
  69.         }
  70.         $this->view->demoDescription $demoDescription;
  71.  
  72.         return $demoDescription;
  73.  
  74.     }
  75. }

Documentation generated on Fri, 27 Mar 2009 13:48:43 +0000 by phpDocumentor 1.4.1