Example #1
0
 /**
  * Set Thumbnail Size
  * 
  * Sets the default thumbnail size.
  * 
  * @param int $width
  * @param int $height
  * @return bool
  */
 public static function SetThumbnailSize($width, $height)
 {
     // Log
     $success = OnePanelDebug::Track('Setting default thumbnail sizes to ' . $width . 'x' . $height);
     /*
      * Check the integrity of the input for each argument and
      * set the data accordingly, if non integer value is passed the thumbnail 
      * generator will not work as typecasting a string will return 0 in some cases.
      * 
      */
     // Width
     if (OnePanelDebug::IsPositiveInteger($width)) {
         self::$thumbnail_width = $width;
     } else {
         $success->Fail();
         return false;
     }
     // Height
     if (OnePanelDebug::IsPositiveInteger($height)) {
         self::$thumbnail_height = $height;
     } else {
         $success->Fail();
         return false;
     }
     $success->Affirm();
     return true;
 }