Parse variable given class name.
@param Node $class_name
@return Node
489734
private function varClass(Node $class_name) {
    $colon_node = new PartialNode();
    $this->mustMatch(T_DOUBLE_COLON, $colon_node);
    if ($this->currentType === T_STRING) {
      $method_name = $this->mustMatchToken(T_STRING);
      return $this->classMethodCall($class_name, $colon_node, $method_name);
    }
    else {
      return $this->classVariable($class_name, $colon_node);
    }
  }
1176882
public function getNamespace($class_name)
	{
		$class_name = trim($class_name, '\\');
		if ($last_separator = strrpos($class_name, '\\'))
		{
			return substr($class_name, 0, $last_separator + 1);
		}
		return '';
	}
739993
protected function elementClass(string $var_name = ''): string
    {
        if ($this->action) {
            return $this->s::restActionFormElementClass($var_name);
        } elseif ($this->cfg->Widget) {
            return $this->cfg->Widget->get_field_id($var_name);
        }
        return $this->cfg->slug.($var_name ? '-'.$this->c::nameToSlug($var_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';
            }
        }
    }
364169
public static function create($parameter_name) {
    $parameter_name = '$' . ltrim($parameter_name, '$');
    $parameter_node = new ParameterNode();
    $parameter_node->addChild(new VariableNode(T_VARIABLE, $parameter_name), 'name');
    return $parameter_node;
  }
1180235
static function deserialize($class_name, $assoc_s)
    {
        $pairs = Auth_OpenID_KVForm::toArray($assoc_s, $strict = true);
        $keys = array();
        $values = array();
        foreach ($pairs as $key => $value) {
            if (is_array($value)) {
                list($key, $value) = $value;
            }
            $keys[] = $key;
            $values[] = $value;
        }

        $class_vars = get_class_vars($class_name);
        $class_assoc_keys = $class_vars['assoc_keys'];

        sort($keys);
        sort($class_assoc_keys);

        if ($keys != $class_assoc_keys) {
            trigger_error('Unexpected key values: ' . var_export($keys, true),
                          E_USER_WARNING);
            return null;
        }

        $version = $pairs['version'];
        $handle = $pairs['handle'];
        $secret = $pairs['secret'];
        $issued = $pairs['issued'];
        $lifetime = $pairs['lifetime'];
        $assoc_type = $pairs['assoc_type'];

        if ($version != '2') {
            trigger_error('Unknown version: ' . $version, E_USER_WARNING);
            return null;
        }

        $issued = intval($issued);
        $lifetime = intval($lifetime);
        $secret = base64_decode($secret);

        return new $class_name(
            $handle, $secret, $issued, $lifetime, $assoc_type);
    }
412124
def parse(self, file_name):
        
        self.object = self.parsed_class()
        with open(file_name, encoding='utf-8') as f:
            self.parse_str(f.read())
        return self.object
932009
public function importsClass($class_name = NULL) {
    if ($this->useFunction || $this->useConst) {
      return FALSE;
    }
    if ($class_name) {
      foreach ($this->getDeclarations() as $declaration) {
        if ($declaration->getName()->getPath() === $class_name) {
          return TRUE;
        }
      }
      return FALSE;
    }
    else {
      return TRUE;
    }
  }
691818
public function GetClassChilds($class_name, $namespace="")
    {   
        $childs = array();
        
        if(!$namespace)
        {
            $components = $this->GetComponents($class_name);
            
            if($components->HasNamespace())
            {
                $namespace = $components->namespace;
                $class_name = $components->type;
            }
            else
            {
                $namespace = "\\";
            }
        }
        
        $parent_class = "";
        
        if($namespace != "\\")
            $parent_class .= $namespace . "\\" . $class_name;
        else
            $parent_class .= $class_name;
        
        foreach($this->headers as $header_object)
        {
            foreach($header_object->namespaces as $namespace_object)
            {
                foreach($namespace_object->classes as $class_object)
                {
                    if(in_array($parent_class, $class_object->parents))
                    {
                        $childs[$class_object->name] = $class_object;
                        
                        $childs += $this->GetClassChilds(
                            $class_object->name,
                            $class_object->namespace->name
                        );
                    }
                }
            }
        }
        
        return $childs;
    }
691248
public static function getVarId(
        PhpParser\Node\Expr $stmt,
        $this_class_name,
        FileSource $source = null,
        &$nesting = null
    ) {
        if ($stmt instanceof PhpParser\Node\Expr\Variable && is_string($stmt->name)) {
            return '$' . $stmt->name;
        }

        if ($stmt instanceof PhpParser\Node\Expr\StaticPropertyFetch
            && $stmt->name instanceof PhpParser\Node\Identifier
            && $stmt->class instanceof PhpParser\Node\Name
        ) {
            if (count($stmt->class->parts) === 1
                && in_array(strtolower($stmt->class->parts[0]), ['self', 'static', 'parent'], true)
            ) {
                if (!$this_class_name) {
                    $fq_class_name = $stmt->class->parts[0];
                } else {
                    $fq_class_name = $this_class_name;
                }
            } else {
                $fq_class_name = $source
                    ? ClassLikeAnalyzer::getFQCLNFromNameObject(
                        $stmt->class,
                        $source->getAliases()
                    )
                    : implode('\\', $stmt->class->parts);
            }

            return $fq_class_name . '::$' . $stmt->name->name;
        }

        if ($stmt instanceof PhpParser\Node\Expr\PropertyFetch && $stmt->name instanceof PhpParser\Node\Identifier) {
            $object_id = self::getVarId($stmt->var, $this_class_name, $source);

            if (!$object_id) {
                return null;
            }

            return $object_id . '->' . $stmt->name->name;
        }

        if ($stmt instanceof PhpParser\Node\Expr\ArrayDimFetch && $nesting !== null) {
            ++$nesting;

            return self::getVarId($stmt->var, $this_class_name, $source, $nesting);
        }

        return null;
    }
574736
protected static function _GetSeesionClassLayerPath ($name = [], $class_path = null) {
		$classes_layer_path = [
			'fw2',
			'classes',
			$class_path ?: static::class
		];
		return array_merge($classes_layer_path, Arrays::AdjustArray($name));
	}
491897
public static function GetClassVar ($name, $default_value = null) {
		return (static::HasClassVar($name)) ? Arrays::GetLowest(static::$_ApplicationVariableTrait_Data, $name) : $default_value;
	}
387579
public static function get_namespace($class_name)
	{
		$class_name = trim($class_name, '\\');
		if ($last_separator = strrpos($class_name, '\\'))
		{
			return substr($class_name, 0, $last_separator + 1);
		}
		return '';
	}
866067
static function load($class_name)
    {
        if (stream_resolve_include_path(
            "modules/archi/includes/".$class_name.".class.php"
        )) {
            include_once "modules/archi/includes/".$class_name.".class.php";
        } else if (stream_resolve_include_path(
            __DIR__."/frameworkClasses/".$class_name.".class.php"
        )) {
            include_once __DIR__."/frameworkClasses/".$class_name.".class.php";
        }
    }
122777
protected function isNodeElementAware($class_name)
	{
		$node_element_aware_interface = 'QATools\\QATools\\PageObject\\Element\\INodeElementAware';

		if ( class_exists($class_name) ) {
			return in_array($node_element_aware_interface, class_implements($class_name));
		}

		return false;
	}
1108629
protected function classMatches($class_name, $descendant_of)
	{
		$class_name = ltrim($class_name, '\\');
		$descendant_of = ltrim($descendant_of, '\\');
		$match_with = array_merge(class_implements($class_name), class_parents($class_name));

		return $class_name == $descendant_of || in_array($descendant_of, $match_with);
	}
862708
private function constructor(string $class_name, array $params = null)
    {
        $this->state->category = CompilerState::CATEGORY_CONSTRUCTOR;
        $this->state->name = '';
        $params_str = '';
        if (is_array($params)){
            $params_str = $this->decorateParamsForMethodCall($params);
        }
        return $class_name . '(' . $params_str . ')';
    }