Get class prefix

@param string $class_name
@return string
502646
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);
        }
    }
927342
public function getClassName(string $type): string
    {
        assert(isset($this->classes[$type]));
        return $this->classes[$type];
    }
433270
private function getTypeName($name)
    {
        if (!$name) {
            return null;
        }

        if (is_string($name)) {
            return $name;
        }

        $prefix = '';
        if ($name instanceof NullableType) {
            $name   = $name->type;
            $prefix = '?';
        }

        return $prefix . $this->getFullClassName($name);
    }
51674
public static function load($class_name)
    {
        $parts = explode('\\', $class_name);

        if ($parts[0] == "Aerospike" && $parts[1] == "GeoJSON") {
           if (count($parts) == 2) {
                require __DIR__. DIRECTORY_SEPARATOR. 'GeoJSON.php';
            }
            elseif ($parts[2] == 'Serializable') {
                require __DIR__. DIRECTORY_SEPARATOR. 'Serializable.php';
            }
        }
    }
673259
public static function isInstanceOf($class_name) {
    $classes = func_get_args();

    return function ($node) use ($classes) {
      foreach ($classes as $class) {
        if ($node instanceof $class) {
          return TRUE;
        }
      }
      return FALSE;
    };
  }
884009
function get_name($class, $function, $name = null)
    {
        $result = false;
        if (isset(Eresus_CMS::getLegacyKernel()->conf['extensions']))
        {
            if (isset(Eresus_CMS::getLegacyKernel()->conf['extensions'][$class]))
            {
                if (isset(Eresus_CMS::getLegacyKernel()->conf['extensions'][$class][$function]))
                {
                    $items = Eresus_CMS::getLegacyKernel()->conf['extensions'][$class][$function];
                    reset($items);
                    $result = isset($items[$name]) ? $name : key($items);
                }
            }
        }

        return $result;
    }
261270
public function getExtendedClassName()
    {
        if ($this->getExtendedClass() === null) {
            return '';
        }

        $name = str_replace('%', ' ', $this->getExtendedClass());
        $name = str_replace('.', ' ', $name);
        $name = str_replace(':', ' pseudo-class-', $name);
        return trim($name);
    }
797004
function prefix( $name = '' ) {
		return is_object( $this->parent ) ? $this->parent->prefix( $name ) : $name;
	}
449827
public static function getClassName($with_namespaces = true)
    {
        $class_name = get_called_class();
        if($with_namespaces) return $class_name;
        $class = explode('\\',  $class_name);

        return $class[count($class) - 1];
    }
582052
private static function load($class_name)
    {
        $class_name = trim($class_name, '\\');

        foreach (self::$_namespace_list as $namespace => $path_list) {
            $pattern = '/^' . str_replace('\\', '\\\\', $namespace) . '/';

            if (!preg_match($pattern, $class_name)) {
                continue;
            }

            $class_name = str_replace($namespace, '', trim($class_name, '\\'));
            $class_name = str_replace('\\', '/', trim($class_name, '\\'));

            foreach ($path_list as $path) {
                if (!file_exists("{$path}/{$class_name}.php")) {
                    continue;
                }

                require "{$path}/{$class_name}.php";

                return true;
            }
        }

        throw new Exception("Class: {$class_name} is not found.");
    }
25848
protected function _findClasses($class_names)
    {
        if (!is_array($class_names)) {
            $class_names = array($class_names);
        }
        foreach ($class_names as $_cls) {
            if (true===class_exists($_cls)) {
                return $_cls;
            }
        }
        return false;
    }
208198
public static function ExtractNameSpace ($class_name, $encoding = self::DEFAULT_ENCODING) {
		return (mb_substr($class_name, mb_strlen($class_name, $encoding) - 1, 1, $encoding) === static::NAMESPACE_SEPARATOR)
		 ? $class_name
		 : mb_substr( $class_name, 0, mb_strrpos($class_name, static::NAMESPACE_SEPARATOR, 0, $encoding), $encoding);
	}
52510
public static function isClassMethodCall($class_name, $method_name) {
    return function ($node) use ($class_name, $method_name) {
      if ($node instanceof ClassMethodCallNode) {
        $call_class_name_node = $node->getClassName();
        $call_class_name = $call_class_name_node instanceof NameNode ? $call_class_name_node->getAbsolutePath() : $call_class_name_node->getText();
        $class_matches = $call_class_name === $class_name;
        $method_matches = $node->getMethodName()->getText() === $method_name;
        return $class_matches && $method_matches;
      }
      return FALSE;
    };
  }
957905
public function loadObjectList($class_name = "stdClass")
    {
        if ($this->stmt === null) {
            return null;
        }

        $objectList = array();
        while ($object = $this->stmt->fetchObject($class_name)) {
            $objectList[] = $object;
        }
        return $objectList;
    }
1225971
private function get_file_name_from_class( $class ) {
		if ( 'classmap' === static::$autoload_type ) {
			$filtered_class_name = explode( '\\', $class );
			$class_filename      = end( $filtered_class_name );
			$class_filename      = str_replace( '_', '-', $class_filename );

			return static::$filename_prefix . $class_filename . '.php';
		} else {

			return $this->psr4_get_file_name_from_class( $class );
		}
	}
1305827
protected function formatClass($class_name, $ctor_args)
    {
        $r = new ReflectionClass($class_name);
        $data = $r->newInstanceArgs((array) $ctor_args);

        foreach ($this->getData() as $key => $value) {
            $data->$key = $value;
        }

        return $data;
    }
601226
private function getModelNameFromClass($model_class)
    {
        if (($pos = strrpos($model_class, '\\')) !== false) {
            return Inflector::pluralize(Inflector::tableize(substr($model_class, $pos + 1)));
        } else {
            return Inflector::pluralize(Inflector::tableize($model_class));
        }
    }