Get the present export-ignore entries of
the .gitattributes file.

@return array
321705
public function getPresentExportIgnores()
    {
        if ($this->hasGitattributesFile() === false) {
            return [];
        }

        $gitattributesContent = (string) file_get_contents($this->gitattributesFile);

        $gitattributesLines = preg_split(
            '/\\r\\n|\\r|\\n/',
            $gitattributesContent
        );

        $exportIgnores = [];
        array_filter($gitattributesLines, function ($line) use (&$exportIgnores) {
            if (strstr($line, 'export-ignore', true)) {
                list($line, $void) = explode('export-ignore', $line);
                if ($this->patternHasMatch(trim($line))) {
                    if (substr($line, 0, 1) === '/') {
                        $line = substr($line, 1);
                    }

                    return $exportIgnores[] = trim($line);
                }
            }
        });

        if ($this->isStrictOrderCamparisonEnabled() === false) {
            sort($exportIgnores, SORT_STRING | SORT_FLAG_CASE);
        }

        return array_unique($exportIgnores);
    }
452266
public function getExportModes()
    {
        return array(
            'listHandle' =>         ExportableField::LIST_OF
                                    + ExportableField::HANDLE,
            'listValue' =>          ExportableField::LIST_OF
                                    + ExportableField::VALUE,
            'listHandleToValue' =>  ExportableField::LIST_OF
                                    + ExportableField::HANDLE
                                    + ExportableField::VALUE,
            'getPostdata' =>        ExportableField::POSTDATA
        );
    }
249117
private function getFiles()
    {
        $process = new Process('git diff --cached --name-status --diff-filter=ACMR');
        $process->run();

        if ($process->isSuccessful()) {
            return array_filter(explode("\n", $process->getOutput()));
        }

        return [];
    }
345341
protected function getColumnsToExport()
    {
        if (is_array($this->columnsToExport)) {
            return $this->columnsToExport;
        }

        $columnsToExport = [];
        foreach ($this->getColumns() as $column) {
            /* @var $column \ZfcDatagrid\Column\AbstractColumn */

            if (! $column instanceof Column\Action &&
                $column->isHidden() === false &&
                in_array(get_class($column->getType()), $this->allowedColumnTypes)
            ) {
                $columnsToExport[] = $column;
            }
        }
        if (empty($columnsToExport)) {
            throw new \Exception('No columns to export available');
        }

        $this->columnsToExport = $columnsToExport;

        return $this->columnsToExport;
    }
786499
public function ExportMetaData()
    {
        $def = $this->getDefinition();
        return new ArrayData(array(
            'ExportHost' => preg_replace("#http(s)?://#", '', Director::protocolAndHost()),
            'ExportDate' => date('d/m/Y H-i-s'),
            'ExportUser' => $this->member->FirstName.' '.$this->member->Surname,
            'ExportVersionFramework' => $this->ssVersion(),
            'ExportWorkflowDefName' => $this->processTitle($def->Title),
            'ExportRemindDays' => $def->RemindDays,
            'ExportSort' => $def->Sort
        ));
    }
1024978
public static function getStatics()
    {
        return array(
            'aliases' => self::$aliases,
            'app_root_dirs' => self::$app_root_dirs,
            'cli_detection' => self::$cli_detection,
            'display_called_from' => self::$display_called_from,
            'enabled_mode' => self::$enabled_mode,
            'expanded' => self::$expanded,
            'file_link_format' => self::$file_link_format,
            'max_depth' => self::$max_depth,
            'mode_default' => self::$mode_default,
            'mode_default_cli' => self::$mode_default_cli,
            'plugins' => self::$plugins,
            'renderers' => self::$renderers,
            'return' => self::$return,
        );
    }
1276019
public function getExportFiles(ExportCommand $exportCommand)
    {
        $locales = $this->determineLocalesToImport($exportCommand);
        $domains = $this->determineDomainsToImport($exportCommand);

        $translations = $this->translationRepository->getTranslationsByLocalesAndDomains($locales, $domains);

        $translationFiles = new ArrayCollection();

        /** @var Translation $translation */
        foreach ($translations as $translation) {
            $exportFileKey = $translation->getDomain() . '.' . $translation->getLocale() . '.' . $exportCommand->getFormat();

            if (!$translationFiles->containsKey($exportFileKey)) {
                $exportFile = new ExportFile();
                $exportFile->setExtension($exportCommand->getFormat());
                $exportFile->setDomain($translation->getDomain());
                $exportFile->setLocale($translation->getLocale());
                $translationFiles->set($exportFileKey, $exportFile);
            }

            $translationFiles->get($exportFileKey)->addTranslation($translation);
        }

        return $translationFiles;
    }
573842
public function export()
    {
        return (object)[
            'format'     => $this->getFormat(),
            'id'         => $this->getId(),
            'language'   => $this->getLanguage(),
            'value'      => $this->getValue(),
            'types'      => array_map(
                function ($type) {
                    return $type->profile.$type->name;
                },
                $this->getType()
            ),
            'properties' => $this->getProperties()->export(),
            'items'      => array_map(
                function (ItemInterface $item) {
                    return $item->export();
                },
                $this->getChildren()
            )
        ];
    }
927865
public function exportConfiguration()
    {
        $configuration = [];

        foreach ($this->getArguments() as $name => $argument) {
            $configuration[$name] = $argument->getValue();
        }

        return $configuration;
    }
1124956
protected function getPropStats(): array
    {
        $result = [];
        $failed = false;
        
        foreach ($this->proppatch->getOperations() as $operation) {
            $tmp = $operation->getResult();
            
            if (is_integer($tmp)) {
                if (empty($result[$tmp])) {
                    $result[$tmp] = [];
                }
                
                $result[$tmp][] = $operation;
            } elseif ($tmp instanceof HttpException) {
                $tmp = $tmp->getCode();
                
                if (empty($result[$tmp])) {
                    $result[$tmp] = [];
                }
                
                $result[$tmp][] = $operation;
            } else {
                $tmp = WebDav::CODE_CONFLICT;
                
                if (empty($result[$tmp])) {
                    $result[$tmp];
                }
                
                $result[$tmp][] = $operation;
            }
            
            if ($tmp != WebDav::CODE_OK) {
                $failed = true;
            }
        }
        
        if ($failed && !empty($result[WebDav::CODE_OK])) {
            if (empty($result[WebDav::CODE_FAILED_DEPENDENCY])) {
                $result[WebDav::CODE_FAILED_DEPENDENCY] = [];
            }
            
            foreach ($result[WebDav::CODE_OK] as $operation) {
                $result[WebDav::CODE_FAILED_DEPENDENCY][] = $operation;
            }
            
            unset($result[WebDav::CODE_OK]);
        }
        
        ksort($result, SORT_NUMERIC);
        
        return $result;
    }
1215184
public function getDotEnvData()
	{
		$fileData = array_filter( explode( "\n", file_get_contents( base_path( '.env' ) ) ) );
		$data = [];
		foreach( $fileData as $keyValuePair ) {
			$split = explode( '=', $keyValuePair, 2 );
			$data[trim($split[0])] = trim($split[1]);
		}
		return $data;
	}
477315
protected function getStaticData()
    {
        $lang = \tao_helpers_I18n::getLangResourceByCode(DEFAULT_LANG)->getUri();

        return array(
            GenerisRdf::PROPERTY_USER_DEFLG => $lang,
            GenerisRdf::PROPERTY_USER_TIMEZONE => TIME_ZONE,
            GenerisRdf::PROPERTY_USER_ROLES => TaoOntology::PROPERTY_INSTANCE_ROLE_DELIVERY,
        );
    }
121702
public function getAttributes()
    {
        // Quick, ugly hack to handle 5.6.37 update (getAttributes() now also called in performInsert()).
        if ($this->isPerformInsertInBacktrace()) {
            return parent::getAttributes();
        }

        return array_merge($this->attachedFiles, parent::getAttributes());
    }
1293874
public function exportItems()
    {
        $columns = $this->getColumns();
        $rows = $this->getRows();
        $items = [];
        foreach ($rows as $row) {
            $item = [];
            foreach ($row['data'] as $index => $value) {
                $item[$columns[$index]['datasourceId']] = $value;
            }
            $items[] = $item;
        }

        return $items;
    }
665099
public function export_data_for_external() {
        $data = $this->get_data();
        $options = $this->get_options();

        foreach ($data->grades as $reportdata) {
            // If we are in submission phase ignore the following data.
            if ($options->workshopphase == workshop::PHASE_SUBMISSION) {
                unset($reportdata->submissiongrade);
                unset($reportdata->gradinggrade);
                unset($reportdata->submissiongradeover);
                unset($reportdata->submissiongradeoverby);
                unset($reportdata->submissionpublished);
                unset($reportdata->reviewedby);
                unset($reportdata->reviewerof);
                continue;
            }

            if (!$options->showsubmissiongrade) {
                unset($reportdata->submissiongrade);
                unset($reportdata->submissiongradeover);
            }

            if (!$options->showgradinggrade and $tr == 0) {
                unset($reportdata->gradinggrade);
            }

            if (!$options->showreviewernames) {
                foreach ($reportdata->reviewedby as $reviewedby) {
                    $reviewedby->userid = 0;
                }
            }

            if (!$options->showauthornames) {
                foreach ($reportdata->reviewerof as $reviewerof) {
                    $reviewerof->userid = 0;
                }
            }
        }

        return $data;
    }
454336
public function export()
    {
        $rows = [];
        foreach ($this->messages as $message) {
            list($text, $level, $category, $timestamp) = $message;
            if (!is_string($text)) {
                // exceptions may not be serializable if in the call stack somewhere is a Closure
                if ($text instanceof \Throwable || $text instanceof \Exception) {
                    $text = (string) $text;
                } else {
                    $text = VarDumper::export($text);
                }
            }
            $rows[] = [
                'level' => $level,
                'category' => $category,
                'log_time' => $timestamp,
                'prefix' => $this->getMessagePrefix($message),
                'message' => $text,
            ];
        }

        $this->db->getCollection($this->logCollection)->batchInsert($rows);
    }
927216
public function getExport()
  {
      if (null === $this->export) {
          $this->export = array();
          $this->fillExport();
      }

      return $this->export;
  }