Get the instantiated object for this job that will be performing work.

@return object Instance of the object that this job belongs to.
12775
public function getInstance()
	{
		if (!is_null($this->instance)) {
			return $this->instance;
		}

		if (class_exists('Resque_Job_Creator')) {
			$this->instance = Resque_Job_Creator::createJob($this->payload['class'], $this->getArguments());
		} else {
			if(!class_exists($this->payload['class'])) {
				throw new Resque_Exception(
					'Could not find job class ' . $this->payload['class'] . '.'
				);
			}

			if(!method_exists($this->payload['class'], 'perform')) {
				throw new Resque_Exception(
					'Job class ' . $this->payload['class'] . ' does not contain a perform method.'
				);
			}
			$this->instance = new $this->payload['class']();
		}

		$this->instance->job = $this;
		$this->instance->args = $this->getArguments();
		$this->instance->queue = $this->queue;
		return $this->instance;
	}
514307
final public static function getInstance()
    {
        $className = get_called_class();
        if (!isset(self::$_instances[$className])) {
            $instance = new $className();
            /* @var SingleTon $instance */
            $instance->init();
            self::$_instances[$className] = $instance;
        }
        return self::$_instances[$className];
    }
795167
public static function getInstance()
    {
        if (!self::$_instance) {
            self::$_instance = new Environment();
            Configure::write('Environment.initialized', true);
        }

        return self::$_instance;
    }
378259
public static function getInstance()
    {
        if (is_null(self::$instance)) {
            throw new \RuntimeException('You must first create the singleton instance with createInstance().');
        }
        self::$instance->setGlobalsFromSugar();
        self::$instance->chdirToSugarDir();

        return self::$instance;
    }
258486
public static function getInstance()
    {
        if (!isset(self::$_instanceOfSelf)) {
            $c = __CLASS__;
            self::$_instanceOfSelf = new $c;
        }
        return self::$_instanceOfSelf;
    }
1107959
protected function _initJob()
    {
        $jobCode = $this->getRequest()->getParam('job_code', null);
        $job = Mage::getModel('aoe_scheduler/job')->load($jobCode);
        Mage::register('current_job_instance', $job);
        return $job;
    }
293029
public function getWorkflowInstance()
    {
        if (!$this->currentInstance) {
            $this->currentInstance = $this->getWorkflowService()->getWorkflowFor($this->owner);
        }

        return $this->currentInstance;
    }
696023
public synchronized Object getNextJob()
    {
        Object strJobDef = null;
        synchronized (this)
        {
            if (gvJobs.size() > 0)
                strJobDef = gvJobs.remove(0);
        }
        return strJobDef;
    }
189061
public static function make()
    {
        $name = get_called_class();

        if (!isset(static::$instances[$name])) {

            $instance = new $name();

            static::$instances[$name] = method_exists($instance, 'boot') ? $instance->boot() : $instance;
        }

        return static::$instances[$name];
    }
1019831
public function build()
    {
        $job = new JobDetail();

//        $job->setJobClass($this->jobClass);

        if(null == $this->key) {
            $this->key = new Key(Key::createUniqueName(null), null);
        }

        $job->setKey($this->key);
        $job->setDescription($this->description);
        $job->setDurable($this->durability);
//        $job->setRequestsRecovery($this->shouldRecover);
        $job->setJobClass($this->jobClass);
        $job->setJobDataMap($this->jobDataMap);

        return $job;
    }
658088
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(CallEventFactory::instance());
        }

        return self::$instance;
    }
862685
public static function instance() {
		if ( ! isset( self::$instance ) ) {
			self::$instance = new self;
			self::$instance->boot();
			self::$instance->setup_actions();
		}

		return self::$instance;
	}
476544
public static function getInstance()
    {
        if (!static::$instance instanceof self) {
            static::$instance = $session = new self();
            if (!$session->isStarted()) {
                $session->start();
            }
        }

        return static::$instance;
    }
306601
public function getInstance()
    {
        if ($this->isSingleton() && $this->hasInstance()) {
            return $this->instance;
        }

        // require path
        if ($this->path) {
            require_once $this->path;
        }

        // initialize
        if ($this->isClosure()) {
            $closure = $this->class;
            $instance = $closure($this->container);
        } else {
            $class = $this->class;
            if ($class[0] !== '\\') $class = '\\' . $class;
            $script = sprintf('$instance = new %s(%s);', $class, $this->array2ArgsWithInjectDependency('$this->args', $this->args));
            eval($script);
        }

        if ($this->isSingleton()) {
            $this->instance = $instance;
        }
        if ($this->container && method_exists($instance, 'setContainer')) {
            $instance->setContainer($this->container);
        }
        
        // inject dependency
        if ($this->container) {
            $this->container->injectDependency($instance);
        }
        
        // init method
        if ($this->hasInitMethod()) {
            $this->callInitMethod($instance);
        } elseif($this->hasInitializeMethod($instance)) {
            $instance->initialize();
        }

        return $instance;
    }
1139326
public static function getInstance()
    {
        $accesor = static::getAccessor();

        if (!static::$instance instanceof $accesor) {
            static::beforeConstruct();

            $args = static::getArguments();

            static::$instance = static::make($accesor, $args);

            static::afterConstruct();
        }

        return static::$instance;
    }
1293571
public JobSubmission instantiateForInsert() {
		JobSubmission entity = new JobSubmission();
		entity.setIsDeleted(Boolean.FALSE);
		entity.setStatus("Submitted");
		entity.setCandidate(new Candidate(1));
		entity.setJobOrder(new JobOrder(1));
		return entity;
	}
382219
protected function getObject()
    {
        $object = $this->storage->getObject();
        if (!($object instanceof StoredEntity))
        {
            $object = new StoredEntity();
        }
        return $object;
    }