Returns an array with the document info to debug.

@return array An array with the document info.
438946
public function debug()
    {
        $info = array();

        $metadata = $this->getMetadata();

        $referenceFields = array();
        foreach (array_merge($metadata['referencesOne'], $metadata['referencesMany']) as $name => $reference) {
            $referenceFields[] = $reference['field'];
        }

        // fields
        foreach ($metadata['fields'] as $name => $field) {
            if (in_array($name, $referenceFields)) {
                continue;
            }
            $info['fields'][$name] = $this->{'get'.ucfirst($name)}();
        }

        // referencesOne
        foreach ($metadata['referencesOne'] as $name => $referenceOne) {
            $info['referencesOne'][$name] = $this->{'get'.ucfirst($referenceOne['field'])}();
        }

        // referencesMany
        foreach ($metadata['referencesMany'] as $name => $referenceMany) {
            $info['referencesMany'][$name] = $this->{'get'.ucfirst($referenceMany['field'])}();
        }

        // embeddedsOne
        foreach ($metadata['embeddedsOne'] as $name => $embeddedOne) {
            $embedded = $this->{'get'.ucfirst($name)}();
            $info['embeddedsOne'][$name] = $embedded ? $embedded->debug() : null;
        }

        // embeddedsMany
        foreach ($metadata['embeddedsMany'] as $name => $embeddedMany) {
            $info['embeddedsMany'][$name] = array();
            foreach ($this->{'get'.ucfirst($name)}() as $key => $value) {
                $info['embeddedsMany'][$name][$key] = $value->debug();
            }
        }

        return $info;
    }
393238
public function getDiscoveryDocument(): array
    {
        if ($apc = extension_loaded('apc') && apc_exists($this->provider_url)) {
            return apc_get($this->provider_url);
        }
        $ch = curl_init();
        $url = $this->getDiscoveryUrl();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

        $this->logger->debug('fetch openid-connect discovery document from ['.$url.']', [
                'category' => get_class($this),
            ]);

        $result = curl_exec($ch);
        $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);

        if (200 === $code) {
            $discovery = json_decode($result, true);
            $this->logger->debug('received openid-connect discovery document from ['.$url.']', [
                    'category' => get_class($this),
                    'discovery' => $discovery,
                ]);

            if (true === $apc) {
                apc_store($this->provider_url, $discovery);
            }

            return $discovery;
        }
        $this->logger->error('failed to receive openid-connect discovery document from ['.$url.'], request ended with status ['.$code.']', [
                    'category' => get_class($this),
                ]);

        throw new OidcException\DiscoveryNotFound('failed to get openid-connect discovery document');
    }
928950
public function debugLastSoapRequest(): array
    {
        $lastRequestInfo = $this->engine->collectLastRequestInfo();
        return [
            'request' => [
                'headers' => trim($this->soapClient->__getLastRequestHeaders()),
                'body'    => XmlFormatter::format($this->soapClient->__getLastRequest()),
            ],
            'response' => [
                'headers' => trim($this->soapClient->__getLastResponseHeaders()),
                'body'    => XmlFormatter::format($this->soapClient->__getLastResponse()),
            ]
        ];
    }
1075517
public function getIndexedDocuments()
    {
        $db = $this->getSearchDbHandle();
        $sql = '
			SELECT count(DISTINCT documentPath) AS indexedDocuments
			  FROM term_frequency
		';
        if (!$stmt = $db->query($sql)) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        $result = $stmt->fetch(\PDO::FETCH_COLUMN);
        if (false === $result) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        return (int)$result;
    }
672556
public function getReportsInfo()
    {
        $reports    = [];
        $reportsRaw = $this->getFlexiData($this->getEvidenceURL().'/reports');
        if (!empty($reportsRaw) && array_key_exists('reports', $reportsRaw) && !empty($reportsRaw['reports'])
            && array_key_exists('report', $reportsRaw['reports']) &&
            !empty($reportsRaw['reports']['report'])) {
            if (\Ease\jQuery\Part::isAssoc($reportsRaw['reports']['report'])) {
                $reports = [$reportsRaw['reports']['report']['reportId'] => $reportsRaw['reports']['report']];
            } else {
                $reports = self::reindexArrayBy($reportsRaw['reports']['report'],
                        'reportId');
            }
        }
        return $reports;
    }
1264032
public static function getInfos()
    {
        $xDebugEnabled = self::isXdebugEnabled();
        $debugInfos    = array();

        $debugInfos['app']['path']  = APP_PATH;
        $debugInfos['app']['cache'] = Agl::app()->isCacheEnabled();

        if ($xDebugEnabled) {
            $debugInfos['time']   = xdebug_time_index();
            $debugInfos['memory'] = xdebug_peak_memory_usage();
        }

        if (Agl::app()->getDb() !== NULL) {
            $debugInfos['db']['db_engine'] = Agl::app()->getConfig('main/db/engine');
            $debugInfos['db']['queries']   = Agl::app()->getDb()->countQueries();
        }

        $debugInfos['opcache']      = (ini_get('opcache.enable')) ? true : false;
        $debugInfos['apcu']         = (ini_get('apc.enabled')) ? true : false;
        $debugInfos['xdebug']       = $xDebugEnabled;
        $debugInfos['more_modules'] = Agl::getLoadedModules();
        $debugInfos['request']      = Agl::getRequest();

        return $debugInfos;
    }
1193811
protected function getBacktrace() {
            $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);

            if (empty($trace)) {
                // @codeCoverageIgnoreStart
                return [];
                // @codeCoverageIgnoreEnd
            } else {
                foreach ($trace as $k => $v) {
                    foreach (self::$ignoredFiles as $i) {
                        if (stripos(Alo::ifnull($v['file'], ''), $i) !== false) {
                            unset($trace[$k]);
                            break;
                        }
                    }
                }
            }

            return array_values($trace);
        }
1012741
public function getDocumentation()
    {
        $documentation = null;
        $documentationNodes = $this->element->getElementsByTagName('documentation');
        if ($documentationNodes->length > 0) {
            $documentation = $documentationNodes->item(0)->nodeValue;
        }
        return $documentation;
    }
764362
private function getOtherInfo()
    {
        $info = [];

        $anime_info = $this->_parser->find('.js-scrollfix-bottom', 0);
        $other_info = (count($anime_info->find('h2')) > 2) ? $anime_info->find('h2', 1) : $anime_info->find('h2', 0);
        if ($other_info) {
            $next_info = $other_info->next_sibling();
            while (true) {
                $info_type = $next_info->find('span', 0)->plaintext;

                $clean_info_type = strtolower(str_replace(': ', '', $info_type));
                $clean_info_value = $this->getCleanInfo($info_type, $next_info);
                $clean_info_value = $this->getCleanerInfo1($clean_info_type, $clean_info_value);
                $clean_info_value = $this->getCleanerInfo2($next_info, $clean_info_type, $clean_info_value);

                $info[$clean_info_type] = $clean_info_value;

                $next_info = $next_info->next_sibling();
                if ($next_info->tag == 'h2' || $next_info->tag == 'br') {
                    break;
                }
            }
        }

        return $info;
    }
436952
public function debug()
    {
        $constants = get_defined_constants(true);
        $flipped = array_flip($constants['curl']);
        $curlOpts = preg_grep('/^CURLOPT_/', $flipped);
        $curlInfo = preg_grep('/^CURLINFO_/', $flipped);

        $options = [];
        foreach ($this->getCurlOptions() as $const => $value) {
            if (isset($curlOpts[$const])) {
                $options[$curlOpts[$const]] = $value;
            } else if (isset($curlInfo[$const])) {
                $options[$curlInfo[$const]] = $value;
            } else {
                $options[$const] = $value;
            }
        }

        $className = get_class($this);
        $msg = "[{$className}] to {$this->getMethod()}={$this->getUrl()}";

        if (count($this->params) > 0) {
            $params = $this->getParams();
            if ($this->getMethod() == self::POST && $this->hasHeader('Content-Type') && $this->getHeader('Content-Type') == 'application/json') {
                $params = Json::encode($params);
            } else {
                $params = http_build_query($params);
            }

            $msg .= "\nParameters: {$params}";
        }

        if (count($options) > 0) {
            $msg .= 'CURL options: ' . print_r($options, true);
        }

        return $msg;
    }
559634
public function all()
    {
        $result = [];
        foreach ($this->collection->find() as $document) {
            $result[] = [
                'program' => $document['program'],
                'process' => $document['process'],
            ];
        }
        return $result;
    }
762287
public function getReport()
    {
        $report = array();

        $report['restDebug'] = $this->debug->generateOutput();

        $reportEZDebug = $this->eZDebug->printReportInternal( false );
        $report['eZDebug'] = explode( "\n", $reportEZDebug );


        return $report;
    }
316651
private function getAllInfo()
    {
        $data = [];
        $result_table = $this->_parser->find('table', 0);
        $result_area = $result_table->find('tr', 0)->next_sibling();
        while (true) {
            $result = [];

            $name_area = $result_area->find('td', 1);

            $result['image'] = $this->getImage($result_area);
            $result['id'] = $this->getId($name_area);
            $result['name'] = $this->getName($name_area);
            $result['nickname'] = $this->getNickname($name_area);

            if ($this->_type == 'character') {
                $role = $this->getRole($result_area);
                $result = array_merge($result, $role);
            }

            $data[] = $result;

            $result_area = $result_area->next_sibling();
            if (!$result_area) {
                break;
            }
        }

        return $data;
    }
854857
public function getDefAsArray()
    {
        return array_replace(
            $this->element->getDefAsArray(),
            [
                'name'              => $this->getName(),
                'type'              => $this->getType(),
                'doctrineType'      => $this->getTypeDoctrine(),
                'serializerType'    => $this->getTypeSerializer()
            ],
            $this->getHashAnonymousHashRequired()
        );
    }
1259834
public function ___debugInfo()
    {
        $nodeName = 'unknown';

        if ($this->functionLikeNode instanceof Function_) {
            $nodeName = $this->functionLikeNode->name->toString();
        }

        return ['name' => $nodeName];
    }
1226299
public function documentlist()
    {
        if (!$this->getRequest()->getVar('pageID')) {
            return $this->httpError(400);
        }

        $page = SiteTree::get()->byId($this->getRequest()->getVar('pageID'));

        if ($page && $page->getAllDocuments()->count() > 0) {
            $list = '<ul>';

            foreach ($page->getAllDocuments() as $document) {
                $list .= sprintf(
                    '<li><a class="add-document" data-document-id="%s">%s</a></li>',
                    $document->ID,
                    $document->ID . ' - '. Convert::raw2xml($document->Title)
                );
            }

            $list .= '</ul>';

            return $list;
        }

        return sprintf(
            '<p>%s</p>',
            _t('DMSDocumentAddController.NODOCUMENTS', 'There are no documents attached to the selected page.')
        );
    }
87878
public function getDebugLocation()
    {
        $location = '';
        if ($this->class && ($this->method || $this->property)) {
            $location .= $this->fullyQualifiedName($this->class);
            if ($this->method) {
                $location .= ($this->static ? '::' : '->') . $this->method . '()';
            } elseif ($this->property) {
                $location .= ($this->static ? '::$' : '->') . $this->property;
            }
        }
        if ($this->filename) {
            if ($location !== '') {
                $location .= ' in ';
            }
            $location .= $this->filename;
        }
        if ($this->line) {
            if ($location !== '') {
                $location .= ' on';
            }
            $location .= ' line ' . $this->line;
            if ($this->character) {
                $location .= ':' . $this->character;
            }
        }

        return $location;
    }