Handles GET action

@return array|null
@throws \DreamFactory\Core\Exceptions\NotFoundException
@throws \Exception
167574
protected function handleGET()
    {
        if (!empty($this->resource)) {
            /**
             * Example request:
             *
             * GET http://df.instance.com/api/v2/system/app/9?pkg=true&service=1,2,3&schema={"service":["table1","table2"]}&include_files=true
             *
             * GET http://df.instance.com/api/v2/system/app/9?pkg=true&service=s1,s2,s3&schema={"1":["table1","table2"]}&include_files=true
             */
            if ($this->request->getParameterAsBool('pkg')) {
                $schemaString = $this->request->getParameter('schema');
                $schemas = (!empty($schemaString)) ? json_decode($schemaString, true) : [];
                $serviceString = $this->request->getParameter('service');
                $services = (!empty($serviceString)) ? explode(',', $serviceString) : [];
                $includeFiles = $this->request->getParameterAsBool('include_files');
                $includeData = $this->request->getParameterAsBool('include_data');
                $package = new Packager($this->resource);
                $package->setExportItems($services, $schemas);

                return $package->exportAppAsPackage($includeFiles, $includeData);
            }
        }

        return parent::handleGET();
    }
9393
public function get()
    {
        $m = $this->model;
        if (!$m) {
            throw $this->exception('Specify model_class or define your method handlers');
        }

        if ($m->loaded()) {
            if (!$this->allow_list_one) {
                throw $this->exception('Loading is not allowed');
            }

            return $this->outputOne($m->get());
        }

        if (!$this->allow_list) {
            throw $this->app->exception('Listing is not allowed');
        }

        return $this->outputMany($m->setLimit(100)->getRows());
    }
20818
public function get()
    {
        $url = $this->url;
        if (!empty($this->replaceParams)) {
            $url = self::buildUri($url, $this->replaceParams);
        }
        if (!empty($this->queryParams)) {
            $url .= '?' . http_build_query($this->queryParams);
        }
        $this->adapter->setResponseTimeout($this->getResponseTimeout());
        $this->adapter->setConnectTimeout($this->getConnectTimeout());

        return $this->adapter->get(
            $url,
            array(
                self::HEADERS => $this->headers,
            )
        );
    }
1198816
public function get()
    {
         // run the callbacks to retirve the results
        $results = $this->executeResultFetcher();

        // we always exprect an array here!
        if (!is_array($results) || empty($results))
        {
            $results = array();
        }

        // In case we should forward a key means using a value
        // from every result as array key.
        if ((!empty($results)) && $this->forwardKey !== false && is_string($this->forwardKey)) 
        {
            $rawResults = $results;
            $results = array();

            // check if the collection is beeing fetched 
            // as an associated array 
            if (!is_array(reset($rawResults)))
            {
                throw new Exception('Cannot forward key, the result is no associated array.');
            }

            foreach ($rawResults as $result) 
            {
                $results[$result[$this->forwardKey]] = $result;
            }
        }

        // Group the resuls by a items value
        if ((!empty($results)) && $this->groupResults !== false && is_string($this->groupResults)) 
        {
            $rawResults = $results;
            $results = array();

            // check if the collection is beeing fetched 
            // as an associated array 
            if (!is_array(reset($rawResults)))
            {
                throw new Exception('Cannot forward key, the result is no associated array.');
            }

            foreach ($rawResults as $key => $result) 
            {
                $results[$result[$this->groupResults]][$key] = $result;
            }
        }

        // when the limit is specified to exactly one result we
        // return directly that one result instead of the entire array
        if ($this->limit === 1) 
        {
            $results = reset($results);
        }

        return $results;
    }
1354256
protected function handleGET()
    {
        /** @type BaseSystemModel $modelClass */
        $modelClass = static::$model;

        $options = $this->request->getParameters();
        $criteria = $this->getSelectionCriteria();

        if (!empty($this->resource)) {
            //	Single resource by ID
            $fields = array_get($criteria, 'select');
            if (empty($data = $modelClass::selectById($this->resource, $options, $fields))) {
                throw new NotFoundException("Record with identifier '{$this->resource}' not found.");
            }

            return $data;
        }

        $meta = [];
        if (!empty($ids = array_get($options, ApiOptions::IDS))) {
            //	Multiple resources by ID
            $result = $modelClass::selectByIds($ids, $options, $criteria);
        } elseif (!empty($records = ResourcesWrapper::unwrapResources($this->getPayloadData()))) {
            //  Multiple resources by passing records to have them updated with new or more values, id field required
            $pk = $modelClass::getPrimaryKeyStatic();
            $ids = array_column($records, $pk);
            $result = $modelClass::selectByIds($ids, $options, $criteria);
        } else {
            $result = $modelClass::selectByRequest($criteria, $options);

            if ($this->request->getParameterAsBool(ApiOptions::INCLUDE_COUNT)) {
                $meta['count'] = $modelClass::countByRequest($criteria);
            }
        }

        if ($this->request->getParameterAsBool(ApiOptions::INCLUDE_SCHEMA)) {
            /** @var BaseSystemModel $model */
            $model = $this->getModel();
            $meta['schema'] = $model->getTableSchema()->toArray();
        }

        $asList = $this->request->getParameterAsBool(ApiOptions::AS_LIST);
        $idField = $this->request->getParameter(ApiOptions::ID_FIELD, static::getResourceIdentifier());
        $result = ResourcesWrapper::cleanResources($result, $asList, $idField, ApiOptions::FIELDS_ALL, !empty($meta));

        if (!empty($meta)) {
            $result['meta'] = $meta;
        }

        return $result;
    }
580318
protected function get(){
        $bpath = Config::getx('path_temp');
        if(is_file($bpath.'debug.log')){
            return json_decode(file_get_contents($bpath.'debug.log'),true);
        }
        return null;
    }
537491
public function getActions()
    {
        if (null === $this->actions) {
            $this->actions = array();
            $this->findActions();
        }

        return $this->actions;
    }
1193053
public function getAction() : ?string 
    {
        if ( ! $this->hasAction()) {
            $this->setAction($this->getDefaultAction());
        }
        return $this->action;
    }
252325
public static function get()
    {
        $db = Database::connection();
        $treeID = $db->fetchColumn('select Trees.treeID from TreeTypes inner join Trees on TreeTypes.treeTypeID = Trees.treeTypeID where TreeTypes.treeTypeHandle = ?', ['file_manager']);

        return $treeID ? Tree::getByID($treeID) : null;
    }
245483
protected function _get()
    {
        $subject = $this->_subject();
        $this->_trigger('beforeLogout', $subject);

        $subject->set([
            'success' => true,
            'redirectUrl' => $this->_controller()->Auth->logout()
        ]);

        $this->_trigger('afterLogout', $subject);
        $this->setFlash('success', $subject);

        return $this->_redirect(
            $subject,
            $subject->redirectUrl
        );
    }
688000
public static function getRequest()
    {
        if (self::$request) {
            return self::$request;
        }
        // Fall back to trying from the global state
        if (Controller::has_curr()) {
            return Controller::curr()->getRequest();
        }
    }
484553
public function getRequest()
    {
        if (null === $this->request) {
            $this->setRequest($this->getController()->getRequest());
        }

        return $this->request;
    }
1213819
public function get()
	{
		$__data = $this->data();

		// The contents of each view file is cached in an array for the
		// request since partial views may be rendered inside of for
		// loops which could incur performance penalties.
		$__contents = $this->load();

		ob_start() and extract($__data, EXTR_SKIP);

		// We'll include the view contents for parsing within a catcher
		// so we can avoid any WSOD errors. If an exception occurs we
		// will throw it out to the exception handler.
		try
		{
			eval('?>'.$__contents);
		}

		// If we caught an exception, we'll silently flush the output
		// buffer so that no partially rendered views get thrown out
		// to the client and confuse the user with junk.
		catch (\Exception $e)
		{
			ob_get_clean(); throw $e;
		}

		$content = ob_get_clean();

		// The view filter event gives us a last chance to modify the
		// evaluated contents of the view and return them. This lets
		// us do something like run the contents through Jade, etc.
		if (Event::listeners('view.filter'))
		{
			return Event::first('view.filter', array($content, $this->path));
		}

		return $content;
	}
1324585
public function getDispatchAction()
    {
        $params = $this->request->getAll();
        foreach (array_keys($params) as $key) {
            if (preg_match('/^dispatch-(.+)/', $key, $matches)) {
                $action = str_replace('-', '.', $matches[1]);
                return $action;
            }
        }
    }
260611
protected function _run()
    {
//        $class = $this->modelClass;
//        $class::initNavigationPagesById($this->actionParams->get['id']);
        $pageId = \yii::$app->request->getQueryParam('id');
        if ($pageId) {
            $pages = FrontendPage::getNavigationPages($pageId);
            if (empty($pages)) {
                throw new NotFoundHttpException();
            }
        }

        return $this->getResponse([
            'content' => [],
        ]);
    }
75783
protected function getAction()
    {
        $action    = self::CAPTURE_ACTION;
        $request   = $this->getRequest();
        $rawAmount = $request->getRequestParameter(self::MC_GROSS);
        $status    = $request->getRequestParameter(self::PAYPAL_PAYMENT_STATUS);

        if ((0 > $rawAmount) && (self::PAYPAL_STATUS_REFUND_DONE == $status)) {
            $action = self::REFUND_ACTION;
        }

        return $action;
    }
418082
public function get()
    {
        try {
            if (!is_null($this->query)) {
                $statement = $this->connect->prepare($this->query);
                $statement->execute();
                return $statement->fetchAll();
            }

        } catch (\Exception $exception) {
            var_dump($exception->getMessage());
        }
    }