src/WPametu/API/Rewrite.php
public function get_prefix($class_name){
        /** @var RestBase $class_name */
        if( !empty($class_name::$prefix) ){
            return $class_name::$prefix;
        }else{
            $seg = explode('\\', $class_name);
            $base = $seg[count($seg) - 1];
            return $this->str->camel_to_hyphen($base);
        }
    }
public function get_prefix($class_name){
        /** @var RestBase $class_name */
        if( !empty($class_name::$prefix) ){
            return $class_name::$prefix;
        }else{
            $seg = explode('\\', $class_name);
            $base = $seg[count($seg) - 1];
            return $this->str->camel_to_hyphen($base);
        }
    }
public function get_prefix ( $ class_name ) { /** @var RestBase $class_name */ if ( ! empty ( $ class_name :: $ prefix ) ) { return $ class_name :: $ prefix ; } else { $ seg = explode ( '\\' , $ class_name ) ; $ base = $ seg [ count ( $ seg ) - 1 ] ; return $ this -> str -> camel_to_hyphen ( $ base ) ; } }
Get class prefix

@param string $class_name
@return string
Get class prefix