get

@param mixed $instanceId

@return array|\Zend\Stdlib\ResponseInterface|JsonModel
333812
public function get($instanceId)
    {
        $siteId = $this->getServiceLocator()->get(\Rcm\Service\CurrentSite::class)
            ->getSiteId();
        /** @var RcmUserService $rcmUserService */
        $rcmUserService = $this->serviceLocator->get(RcmUserService::class);

        /** @var ResourceName $resourceName */
        $resourceName = $this->getServiceLocator()->get(
            ResourceName::class
        );

        $allowed = $rcmUserService->isAllowed(
            $resourceName->get(ResourceName::RESOURCE_SITES, $siteId),
            'admin',
            \Rcm\Acl\ResourceProvider::class
        );

        if (!$allowed) {
            $this->getResponse()->setStatusCode(401);

            return $this->getResponse();
        }

        $routeMatch = $this->getEvent()->getRouteMatch();
        $pluginType = $routeMatch->getParam('pluginType');
        /**
         * @var $pluginMgr PluginManager
         */
        $pluginMgr = $this->getServiceLocator()
            ->get('Rcm\Service\PluginManager');
        $defaultInstanceCfg = $pluginMgr->getDefaultInstanceConfig($pluginType);
        if (!is_array($defaultInstanceCfg)) {
            return $this->notFoundAction();
        }

        if ($instanceId > 0) {
            try {
                $instanceConfig = $pluginMgr->getInstanceConfig($instanceId);
            } catch (PluginInstanceNotFoundException $e) {
                return $this->notFoundAction();
            }
        } else {
            $instanceConfig = $defaultInstanceCfg;
        }

        return new JsonModel(
            [
                'instanceConfig' => $instanceConfig,
                'defaultInstanceConfig' => $defaultInstanceCfg
            ]
        );
    }
768512
public function getParameterForConstructor($instanceName, $index) {
		if (isset($this->declaredInstances[$instanceName]['constructor'][$index]['value'])) {
			return $this->declaredInstances[$instanceName]['constructor'][$index]['value'];
		} else {
			return null;
		}
	}
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;
    }
1022979
public function getConsumer($instanceId, $topicName, $consumer, $messageTag = NULL)
    {
        return $this->client->getConsumer($instanceId, $topicName, $consumer, $messageTag);
    }
356755
public function get(int $entityId)
    {
        $response = $this->infakt->get($this->getServiceName().'/'.$entityId.'.json');

        if (2 != substr((string) $response->getStatusCode(), 0, 1)) {
            return null;
        }

        return $this->getMapper()->map(\GuzzleHttp\json_decode($response->getBody()->getContents(), true));
    }
560037
static public function getInstance($instanceName)
    {
        if (!isset(self::$instanceArray[$instanceName])) {
            self::$instanceArray[$instanceName] = new MDatabaseConnection();
        }
        return self::$instanceArray[$instanceName];
    }
953229
protected function get_visible_fields(int $instanceid) : array {
        $handler = $this;
        return array_filter($this->get_fields(),
            function($field) use($handler, $instanceid) {
                return $handler->can_view($field, $instanceid);
            }
        );
    }
1248556
public function get($id = null)
    {

        // Prep the endpoint
        $endpoint = ($id) ? $this->getEndpoint() . "/" . $id : $this->getEndpoint();

        // Get the resource
        $response = $this->client->get($endpoint, $this->prepareParams());

        // Handle response
        return $this->handleResponse(json_decode($response));

    }
1182539
public function getPluginWrapper($instanceId)
    {
        if ($this->pluginWrappers->count() < 1) {
            return null;
        }

        /** @var PluginWrapper $pluginWrapper */
        foreach ($this->pluginWrappers as $pluginWrapper) {
            if ($pluginWrapper->getInstance()->getInstanceId() == $instanceId) {
                return $pluginWrapper;
            }
        }

        return null;
    }
831889
public static function &getInstance( $instance = null )
	{
		if ( is_null( self::$instance ) )
		{
			self::$instance = $instance ? $instance : new self();
			// if ( $callback ) $callback( self::$instance );
		}
		return self::$instance;
	}
796029
public static function get($id){
		if( isset(self::$instances[$id]) ){
			return self::$instances[$id];
		}
		return null;
	}
315902
public static function get_instance_info($instanceid) {
        global $DB;

        $params = self::validate_parameters(self::get_instance_info_parameters(), array('instanceid' => $instanceid));
        $warnings = array();

        // Retrieve guest enrolment plugin.
        $enrolplugin = enrol_get_plugin('guest');
        if (empty($enrolplugin)) {
            throw new moodle_exception('invaliddata', 'error');
        }

        self::validate_context(context_system::instance());
        $enrolinstance = $DB->get_record('enrol', array('id' => $params['instanceid']), '*', MUST_EXIST);

        $course = $DB->get_record('course', array('id' => $enrolinstance->courseid), '*', MUST_EXIST);
        if (!core_course_category::can_view_course_info($course) && !can_access_course($course)) {
            throw new moodle_exception('coursehidden');
        }

        $instanceinfo = $enrolplugin->get_enrol_info($enrolinstance);
        // Specific instance information.
        $instanceinfo->passwordrequired = $instanceinfo->requiredparam->passwordrequired;

        unset($instanceinfo->requiredparam);

        $result = array();
        $result['instanceinfo'] = $instanceinfo;
        $result['warnings'] = $warnings;
        return $result;
    }
557996
public static function getInstance($id = 'default')
    {
        if (!isset(static::$instances[$id])) {
            static::$instances[$id] = new self();
        }
        
        return static::$instances[$id];
    }
942810
public function get($entityId = null)
    {
        if (null !== $entityId) {
            $entityId = '/'.$entityId;
        }


        $response = $this->client->get(sprintf('/entities%s', $entityId));

        return $this->decodeResponse($response);
    }
1341450
public function get($addressId)
    {
        $uri = $this->uri . $addressId . '/';
        $response = $this->client->fetch(
            $uri,
            []
        );

        return json_encode($response->getContent(), JSON_FORCE_OBJECT);
    }
1179239
public static function getOrder($orderId) {
        $response = self::requestApi("get", null, $orderId);
        $body = $response->getBodyAsJson();
        $order = new Order($body["order"]);
        return $order;
    }
854197
public function get($shopId)
    {
        $resource = 'shop/' . $shopId . '.json';
        $response = $this->getServiceResponse($resource);

        $getShopResponse = new Models\ResponseShopGet($response);

        return $getShopResponse->getShop();
    }