Returns a ReflectionClass instance for this class.

@return \ReflectionClass
427735
public function getReflectionClass()
    {
        if (!$this->reflClass) {
            $this->reflClass = new \ReflectionClass($this->getClassName());
        }

        return $this->reflClass;
    }
546333
public static function getInstance()
    {
        $self = get_called_class();
        if (!isset(self::$instances[$self])) {
            self::$instances[$self] = new $self;
        }
        return self::$instances[$self];
    }
1333994
final public static function getInstance()
  {
    $className = get_called_class();
    
    if (!isset(self::$_instances[$className])) {
      self::$_instances[$className] = new static();
    }
    self::$_instances[$className]->initialize();

    return self::$_instances[$className];
  }
232736
public function getDeclaringClass()
    {
        if (is_array($this->routineName) === false) {
            return null;
        }
        
        $refClass     = parent::getDeclaringClass();
        $moufRefClass = new MoufReflectionClass($refClass->getName());
        return $moufRefClass;
    }
1051925
public function getInstance()
    {
        if (isset($this->classInstance)) {
            return $this->classInstance;
        }
        $this->classInstance = $this->jobFactory->create($this->payload['class'], $this->getArguments(), $this->queue);
        $this->classInstance->job = $this;
        return $this->classInstance;
    }
138249
public static function getInstance()
    {
        if (self::$instance == null)
        {
            $c = __CLASS__;
            self::$instance = new $c;
        }

        return self::$instance;
    }
293147
private function getReflectionInstance()
    {
        if (\is_array($this->controller) && 2 === \count($this->controller)) {
            //Reflection the method's argument in the controller class
            return new \ReflectionMethod($this->controller[0], $this->controller[1]);
        }

        if (\is_object($this->controller) && !$this->controller instanceof \Closure) {
            //Reflection the method's arguments of the callable object
            $controllerReflected = new \ReflectionObject($this->controller);

            return $controllerReflected->getMethod('__invoke');
        }

        return new \ReflectionFunction($this->controller);
    }
252826
public function getNamespace()
    {
        if (!isset($this->namespace)) {
            $reflectionClass = new \ReflectionClass($this->name);
            $this->namespace = $reflectionClass->getNamespaceName();
        }
        return $this->namespace;
    }
537537
public function getReflector()
    {
        if ($this->isFunction() || $this->isClosure()) {
            return new \ReflectionFunction($this->getCallable());
        }
        if ($this->isMethod()) {
            return new \ReflectionMethod($this->getClassName(), $this->getMethodName());
        }
        if ($this->isInvokedObject()) {
            return new \ReflectionMethod($this->getClassName(), '__invoke');
        }
        throw new \LogicException('Unknown callable reflection');
    }
831250
private function getInstance()
    {
        if (is_null($this->instance)) {
            $this->instance = \RegexGuard\Factory::getGuard();
        }
        
        return $this->instance;
    }
194593
public function getReflectionClass($className)
    {

        // check if we've already initialized the reflection class
        if (isset($this->reflectionClasses[$className]) === false) {
            $this->reflectionClasses[$className] = $this->newReflectionClass($className);
        }

        // return the reflection class instance
        return $this->reflectionClasses[$className];
    }
386794
public static function getInstance()
    {
        $model = get_called_class();

        if (! isset(self::$instance[$model])) {
            self::$instance[$model] = new $model;

            if (is_null(self::$instance[$model]->db)) {
                self::$instance[$model]->getDatabaseInstance();
            }
        }

        return self::$instance[$model];
    }
90663
private static function getProperty()
    {
        $class = get_called_class();
        if (!isset(self::$property_cache[$class])) {
            $reflect = new ReflectionClass($class);
            self::$property_cache[$class] = $reflect->getProperty($reflect->getShortName());
        }
        return self::$property_cache[$class];
    }
197585
public function getClass($class)
    {
        $cacheKey = self::CACHE_KEY_CLASSES . strtolower($class);

        if (! $reflectionClass = $this->cache->fetch($cacheKey)) {
            $reflectionClass = new ReflectionClass($class);
            $this->cache->store($cacheKey, $reflectionClass);
        }

        return $reflectionClass;
    }
1018825
public static function getInstance($class = null)
    {
        $reflector = null;

        if (class_exists($class)) {
            throw new \Exception(sprintf('Class %s not found', $class));
        }

        $reflector = new ReflectionClass('\\'.$class);

        return new $reflector->name();
    }
1141870
public static function get($class)
    {
        $key = strtolower($class);

        if (isset(static::$instances[$key])) {
            return static::$instances[$key];
        }

        static::override($class);

        if (!class_exists($class)) {
            throw new ReflectionException("Class $class does not exist");
        }

        $instance = static::getInstance($class);
        static::register($class, $instance);
        return $instance;
    }
694709
public function build(): object
    {
        $object = $this->instanciator->build($this->class, $this->properties);
        $parameters = $this->instanciator->parameters($this->class);

        //avoid injecting the properties already used in the constructor
        $properties = $this
            ->properties
            ->filter(function(string $property) use ($parameters) {
                return !$parameters->contains($property);
            });
        $refl = new ReflectionObject(
            $object,
            $properties,
            $this->injectionStrategy
        );

        return $refl->build();
    }