/**
  * Return the content of the view
  *
  * @return string
  */
 public function content()
 {
     ob_start();
     $this->_file->output();
     $content = ob_get_contents();
     ob_end_clean();
     return $content;
 }
Exemple #2
0
 /**
  * Check a module version number
  * 
  * @param string $module_name Name of the module
  * @return string
  */
 public static function module($module_name)
 {
     if (is_file('modules/' . $module_name . '/VERSION')) {
         $file = new File('modules/' . $module_name . '/VERSION', true);
         $version = $file->content();
     } else {
         if (is_file($module_name . '/VERSION')) {
             $file = new File($module_name . '/VERSION', true);
             $version = $file->content();
         }
     }
     if (isset($version) && self::validate($version)) {
         return $version;
     } else {
         return self::application();
     }
 }
 /**
  * Construct the FileImage handler
  *
  * @param string $a_path
  * @throws Exception If the file isn't an image or does not exists
  */
 public function __construct($a_path = null)
 {
     try {
         parent::__construct($a_path);
         $this->load();
     } catch (GenericException $e) {
         throw $e;
     }
 }