Shortcut to Intent object

@return Intent
519850
public function getIntent() {
		if($this->getRequest()->getType() != 'IntentRequest') {
			throw new InvalidArgumentException('This request is not an IntentRequest.');
		}

		/** @var IntentRequest $request */
		$request = $this->getRequest();
		return $request->getIntent();
	}
1254369
public function getPrevious()
    {
        $pos = $this->getPosition();
        if ($pos == 0) {
            return null;
        } else {
            $this->getInternalIterator()->seek($pos - 1);

            return $this->getCurrent();
        }
    }
83829
public static void navigateToActivity(Context A, Class<?> B) {
        Intent myIntent = new Intent(A, B);
        A.startActivity(myIntent);
    }
649363
public function ask()
    {
        $this->drawer->open();

        $phkey = new Detector();
        $listener = $phkey->getListenerInstance();
        $event = $listener->getEventDispatcher();

        $event->addListener(
            'key:up',
            function () {
                $this->cursor->moveUp(count($this->choices));
                $this->draw();
            }
        );

        $event->addListener(
            'key:down',
            function () {
                $this->cursor->moveDown(count($this->choices));
                $this->draw();
            }
        );

        $event->addListener(
            'key:space',
            function () {
                $this->selectChoice();
                $this->draw();
            }
        );

        $event->addListener(
            'key:enter',
            function () use ($event) {
                $event->dispatch('key:stop:listening');
                $this->drawer->closeWindow();
            }
        );

        $this->draw();
        $listener->start();

        return $this->getAnswers();
    }
794986
protected function getExistingObject()
    {
        $hook = HookQuery::create()
            ->findPk($this->getRequest()->get('hook_id', 0));

        if (null !== $hook) {
            $hook->setLocale($this->getCurrentEditionLocale());
        }

        return $hook;
    }
621854
public function getApplication(): ?Application
    {
        if ($this instanceof Application) {
            return $this;
        }

        if ($p = $this->parent) {
            return $p->getApplication();
        }

        return null;
    }
895566
private function getShownExtension()
    {
        if($this->hasRequestParameter('shownExtension')){
            $shownExtension = $this->getRequestParameter('shownExtension');
            if(strlen(trim($shownExtension)) > 0){
                $extension = $this->getExtension($shownExtension);
                return $extension->getName();
            }
        }
        return null;
    }
699834
public static Intent openLink(String url) {
        // if protocol isn't defined use http by default
        if (!TextUtils.isEmpty(url) && !url.contains("://")) {
            url = "http://" + url;
        }

        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
        intent.setData(Uri.parse(url));
        return intent;
    }
720703
public function getLocationAction()
    {
        $id = $this
            ->request
            ->query
            ->get('id');

        return $this->createResponseObject(function () use ($id) {
            return $this->normalizeLocationData(
                $this
                    ->locationProvider
                    ->getLocation($id)
            );
        });
    }
807951
public function Link($action = null)
    {
        if ($this->shortcodableclass) {
            return Controller::join_links(
                $this->config()->url_base,
                $this->config()->sc_url_segment,
                'edit',
                $this->shortcodableclass
            );
        }
        return Controller::join_links($this->config()->url_base, $this->config()->sc_url_segment, $action);
    }
280472
public function getObjectActions()
    {
        $objectActions = parent::getObjectActions();

        if (array_key_exists('edit', $objectActions)) {
            unset($objectActions['edit']);
            $this->objectActions = $objectActions;
        }

        return $this->objectActions;
    }
831280
public static String intentToString(Intent intent) {
    if (intent == null) {
      return "null";
    }

    StringBuilder b = new StringBuilder(128);
    b.append("Intent { ");
    intentToShortString(intent, b);
    b.append(" }");
    return b.toString();
  }
484665
public static function to()
    {
        // Is what we're providing a URL object?
        $args = func_get_args();
        if (is_object($args[0]) && $args[0] instanceof UrlInterface) {
            $url = $args[0];
        } else {
            $url = call_user_func_array('\URL::to', func_get_args());
        }
        $r = static::createRedirectResponse((string) $url, 302, array());

        return $r;
    }
588516
private Preference.OnPreferenceClickListener createActionPreferenceClickListener() {
        return new Preference.OnPreferenceClickListener() {

            @Override
            public boolean onPreferenceClick(Preference preference) {
                Toast.makeText(getActivity(), R.string.action_preference_toast, Toast.LENGTH_SHORT)
                        .show();
                return true;
            }

        };
    }
1359670
protected function _findActivityActor()
    {
        $user = $this->getObject('user.provider')->fetch($this->created_by);

        return is_null($user) ? false : true;
    }
93355
public function getStatus(): ?string
    {
        // Active when no expiration intent
        if (null === $this->expiration_intent) {
            return $this::STATUS_ACTIVE;
        }

        // Pending when retrying
        if ($this::RETRY_PERIOD_ACTIVE === $this->is_in_billing_retry_period) {
            return $this::STATUS_PENDING;
        }

        // Expired when not retrying
        if ($this::RETRY_PERIOD_INACTIVE === $this->is_in_billing_retry_period) {
            return $this::STATUS_EXPIRED;
        }

        return null;
    }
1204011
def _map_intent_to_view_func(self, intent):
        """"""
        if intent.label in self._intent_view_funcs:
            view_func = self._intent_view_funcs[intent.label]
        elif self._default_intent_view_func is not None:
            view_func = self._default_intent_view_func
        else:
            raise NotImplementedError(
                'Intent "{}" not found and no default intent specified.'.format(intent.name))

        argspec = inspect.getargspec(view_func)
        arg_names = argspec.args
        arg_values = self._map_params_to_view_args(intent.label, arg_names)

        return partial(view_func, *arg_values)