MediaSearch_File
[ class tree: MediaSearch_File ] [ index: MediaSearch_File ] [ all elements ]

Source for file Util.php

Documentation is available at Util.php

  1. <?php
  2. /**
  3.  * MediaSearch
  4.  *
  5.  * LICENSE
  6.  *
  7.  * "THE BEER-WARE LICENSE" (Revision 42):
  8.  * "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
  9.  * As long as you retain this notice you can do whatever you want with
  10.  * this stuff. If we meet some day, and you think this stuff is worth it,
  11.  * you can buy me a beer in return.
  12.  *
  13.  * $Author$
  14.  * $Revision$
  15.  *
  16.  * @category    MediaSearch
  17.  * @package     MediaSearch_File
  18.  * @copyright   Copyright (c) 2009 Sven Strittmatter
  19.  */
  20.  
  21.  /**
  22.   * Pure static class which provides usefull file helper methods.
  23.   *
  24.   * @category   MediaSearch
  25.   * @package    MediaSearch_File
  26.   * @copyright  Copyright (c) 2009 Sven Strittmatter
  27.   */
  28.     const TRACE_LELVEL 26;
  29.  
  30.     /**
  31.      * Pure static class.
  32.      *
  33.      * @access private
  34.      */
  35.     private function __constructor({}
  36.  
  37.     /**
  38.      * Removes the trailing part beginning at the last . in the sting.
  39.      *
  40.      * @static
  41.      * @access public
  42.      * @param string $string 
  43.      * @return string 
  44.      */
  45.     public static function stripExtension($string{
  46.         return substr($string0strrpos($string'.'));
  47.     }
  48.  
  49.     /**
  50.      * Returns the trailing part beginning at the last . in the sting.
  51.      *
  52.      * @static
  53.      * @access public
  54.      * @param string $string 
  55.      * @return string 
  56.      */
  57.     public static function getExtension($string{
  58.         return substr($stringstrrpos($string'.'1);
  59.     }
  60. }

Documentation generated on Mon, 17 Aug 2009 14:54:23 +0200 by phpDocumentor 1.4.2