@param $pseId
@return JsonResponse

Get a pse details
327854
public function getPseAction($pseId)
    {
        $this->checkAuth(AdminResources::PRODUCT, [], AccessManager::VIEW);

        $request = $this->getRequest();

        $params = array_merge(
            $request->query->all(),
            [
                'id' => $pseId,
            ]
        );

        $results = $this->getProductSaleElements($params);

        if ($results->getCount() == 0) {
            return new JsonResponse(
                sprintf(
                    "The product sale elements id '%d' doesn't exist",
                    $pseId
                ),
                404
            );
        }

        return new JsonResponse($results);
    }
1284126
public function getStatus(string $guid): array
    {
        // Normalise
        $guid = Uuid::fromString($guid)->toString();

        $key = sprintf('job:%s:status', $guid);

        $status_packet = $this->client->get($key);

        return json_decode($status_packet, true);
    }
191244
public function manualReverse($mpayTid)
    {
        $request = new ManualReverse($this->config->getMerchantId());

        $request->setMpayTid($mpayTid);

        $this->request = $request->getXml();

        $this->send();

        $result = new ManualReverseResponse($this->response);

        return $result;
    }
727987
public function hasWebserviceConfiguration(string $webServiceId)
    {
        foreach ($this->configuration['connections'] as $serverId => $configuration) {
            if ($configuration['id'] == $webServiceId) {
                return $serverId;
            }
        }

        return false;
    }
1260526
protected function get_info( $pid ) {
		$post = $this->prepare_post_info($pid);
		if ( !isset($post->post_status) ) {
			return null;
		}

		do_action_ref_array('the_post', array(&$post, &$GLOBALS['wp_query']));

		$post->status = $post->post_status;
		$post->id = $post->ID;
		$post->slug = $post->post_name;
		$customs = $this->get_post_custom($post->ID);
		if ( $this->is_previewing() ) {
			global $wp_query;
			$rev_id = $this->get_post_preview_id($wp_query);
			$customs = $this->get_post_custom($rev_id);
		}
		$post->custom = $customs;
		$post = (object) array_merge((array) $customs, (array) $post);
		return $post;
	}
718979
public function getWebserviceId(string $serverId)
    {
        if (!$this->hasServerConfiguration($serverId)) {
            return null;
        }

        return $this->configuration['connections'][$serverId]['id'];
    }
970627
public function sendNews($id,$msgid)
	{
		$send_snoopy = new Snoopy; 
		$post = array();
		$post['tofakeid'] = $id;
		$post['type'] = 10;
		$post['token'] = $this->_token;
		$post['fid'] = $msgid;
		$post['appmsgid'] = $msgid;
		$post['error'] = 'false';
		$post['ajax'] = 1;
        $send_snoopy->referer = "https://mp.weixin.qq.com/cgi-bin/singlemsgpage?fromfakeid={$id}&msgid=&source=&count=20&t=wxm-singlechat&lang=zh_CN";
		$send_snoopy->rawheaders['Cookie']= $this->cookie;
		$submit = "https://mp.weixin.qq.com/cgi-bin/singlesend?t=ajax-response";
		$send_snoopy->submit($submit,$post);
		$this->log($send_snoopy->results);
		return $send_snoopy->results;
	}
1079985
public function getConnectorFromManager(string $webserviceId)
    {
        //====================================================================//
        // Load Connector Manager
        $manager = $this->get('splash.connectors.manager');
        //====================================================================//
        // Seach for This Connection in Local Configuration
        $serverId = $manager->hasWebserviceConfiguration($webserviceId);
        //====================================================================//
        // Safety Check
        if (!$serverId) {
            return false;
        }
        $connector = $manager->get($webserviceId);
        //====================================================================//
        // Safety Check
        if (!$connector) {
            return false;
        }
        //====================================================================//
        // Setup Php Specific Settings
        self::setupPhpOptions();
        //====================================================================//
        // Setup Local Splash Module for Current Server
        self::setupServerId($serverId);

        return $connector;
    }
797335
protected function getModelFromSerializedId($serializedId)
    {
        $modelId      = ModelId::fromSerialized($serializedId);
        $dataProvider = $this->getEnvironment()->getDataProvider($modelId->getDataProviderName());
        $model        = $dataProvider->fetch($dataProvider->getEmptyConfig()->setId($modelId->getId()));

        if (null === $model) {
            $event = new LogEvent(
                'A record with the ID "' . $serializedId . '" does not exist in "' .
                $this->getEnvironment()->getDataDefinition()->getName() . '"',
                'Ajax executePostActions()',
                TL_ERROR
            );
            $this->getEnvironment()->getEventDispatcher()->dispatch(ContaoEvents::SYSTEM_LOG, $event);

            throw new ResponseException(new Response(Response::$statusTexts[400], 400));
        }

        return $model;
    }
222636
public function admin($webserviceId, $data)
    {
        $server = new SplashServer();
        $this->get('splash.connectors.manager')->identify($webserviceId);

        return $server->admin($webserviceId, $data);
    }
237213
public function getPoi($poiId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_POI_GET_PREFIX, [
            'poi_id' => $poiId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? $result['business'] : false;
    }
1289581
public function getCategorySkuList($cateId)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_CATEGORY_SKU_LIST_PREFIX, [
            'cate_id' => $cateId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['sku_table'] : false;
    }
398067
public function getCategorySubCategory($cateId)
    {
        $result = $this->httpRaw(self::WECHAT_SHOP_CATEGORY_SUB_GET_URL . 'access_token=' . $this->getAccessToken(), [
            'cate_id' => $cateId
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['cate_list'] : false;
    }
544195
public static function getByID($pkID)
    {
        $keys = null;
        $app = Application::getFacadeApplication();
        $cache = $app->make('cache/request');
        if ($cache->isEnabled()) {
            $item = $cache->getItem('permission_keys');
            if (!$item->isMiss()) {
                $keys = $item->get();
            }
        }
        if ($keys === null) {
            $keys = self::loadAll();
        }

        return isset($keys[$pkID]) ? $keys[$pkID] : null;
    }
501550
private function get($identifier)
    {
        $fileSystem= $this->getConfigFileSystem();

        if($fileSystem->has($identifier)){
            return json_decode($fileSystem->read($identifier),true);
        }

        return false;
    }
209615
protected function getOwnerReference($uid) {
    $key = $uid . ':' . self::OWNER_REFERENCE_NAMESPACE;
    if (($object = $this->storage->get($key)) && ($object->owner == $uid)) {
      return $object->data;
    }
  }
590927
public function getNotifications( $jsonDecodePayload = false )
    {
        $output = array();
        while( $notification = $this->getNotification() ) {
            if( $jsonDecodePayload ) {
                $notification['payload'] = json_decode($notification['payload'], true);
            }
            $output[] = $notification;
        }
        return $output;
    }