public static function getClassName($prefix, $name, $ucfirst = false)
  {
    if (substr($prefix, -1, 1) == "\\") {
      $className = $prefix;
    } else {
      $className = $prefix . "_";
    }
    $className .= $name;
    
    if ($ucfirst) {
      $result = "";
      
      $nsPath = explode("\\", $className);
      $name = array_pop($nsPath);
      
      if (sizeof($nsPath)) {
        for ($i = 0; $i < sizeof($nsPath); $i++) {
          $nsPath[$i] = ucfirst(strtolower($nsPath[$i]));
        }
        $result .= implode("\\", $nsPath);
      }
      if (strlen($result) && substr($result, -1, 1) != "\\") {
        $result .= "\\";
      }
      
      $dirPath = explode("_", $name);
      for ($i = 0; $i < sizeof($dirPath); $i++) {
        $dirPath[$i] = ucfirst(strtolower($dirPath[$i]));
      }
      $result .= implode("_", $dirPath);
      
    } else {
      $result = $className;
    }

    return $result;
  }
public static function getClassName($prefix, $name, $ucfirst = false)
  {
    if (substr($prefix, -1, 1) == "\\") {
      $className = $prefix;
    } else {
      $className = $prefix . "_";
    }
    $className .= $name;
    
    if ($ucfirst) {
      $result = "";
      
      $nsPath = explode("\\", $className);
      $name = array_pop($nsPath);
      
      if (sizeof($nsPath)) {
        for ($i = 0; $i < sizeof($nsPath); $i++) {
          $nsPath[$i] = ucfirst(strtolower($nsPath[$i]));
        }
        $result .= implode("\\", $nsPath);
      }
      if (strlen($result) && substr($result, -1, 1) != "\\") {
        $result .= "\\";
      }
      
      $dirPath = explode("_", $name);
      for ($i = 0; $i < sizeof($dirPath); $i++) {
        $dirPath[$i] = ucfirst(strtolower($dirPath[$i]));
      }
      $result .= implode("_", $dirPath);
      
    } else {
      $result = $className;
    }

    return $result;
  }
public static function getClassName ( $ prefix , $ name , $ ucfirst = false ) { if ( substr ( $ prefix , - 1 , 1 ) == "\\" ) { $ className = $ prefix ; } else { $ className = $ prefix . "_" ; } $ className .= $ name ; if ( $ ucfirst ) { $ result = "" ; $ nsPath = explode ( "\\" , $ className ) ; $ name = array_pop ( $ nsPath ) ; if ( sizeof ( $ nsPath ) ) { for ( $ i = 0 ; $ i < sizeof ( $ nsPath ) ; $ i ++ ) { $ nsPath [ $ i ] = ucfirst ( strtolower ( $ nsPath [ $ i ] ) ) ; } $ result .= implode ( "\\" , $ nsPath ) ; } if ( strlen ( $ result ) && substr ( $ result , - 1 , 1 ) != "\\" ) { $ result .= "\\" ; } $ dirPath = explode ( "_" , $ name ) ; for ( $ i = 0 ; $ i < sizeof ( $ dirPath ) ; $ i ++ ) { $ dirPath [ $ i ] = ucfirst ( strtolower ( $ dirPath [ $ i ] ) ) ; } $ result .= implode ( "_" , $ dirPath ) ; } else { $ result = $ className ; } return $ result ; }
Returns className.

@param string $prefix  Prefix
@param string $name    Name
@param bool   $ucfirst First letter - caps

@return string
Returns className .