@return array

@throws \eZ\Bundle\EzPublishCoreBundle\ApiLoader\Exception\InvalidRepositoryException
169845
public function getRepositoryConfig()
    {
        // Takes configured repository as the reference, if it exists.
        // If not, the first configured repository is considered instead.
        $repositoryAlias = $this->configResolver->getParameter('repository');
        if ($repositoryAlias === null) {
            $aliases = array_keys($this->repositories);
            $repositoryAlias = array_shift($aliases);
        }

        if (empty($repositoryAlias) || !isset($this->repositories[$repositoryAlias])) {
            throw new InvalidRepositoryException(
                "Undefined repository '$repositoryAlias'. Did you forget to configure it in ezpublish_*.yml?"
            );
        }

        return array('alias' => $repositoryAlias) + $this->repositories[$repositoryAlias];
    }
919954
public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load Symfony integrations.', E_USER_WARNING);
            return;
        }

        Doctrine::load();

        // public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
        opencensus_trace_method(HttpKernel::class, 'handle', function ($kernel, $request) {
            return [
                'name' => 'kernel/handle'
            ];
        });

        // public function dispatch($eventName, Event $event = null)
        opencensus_trace_method(EventDispatcher::class, 'dispatch', function ($dispatcher, $eventName) {
            return [
                'name' => $eventName,
                'attributes' => ['eventName' => $eventName]
            ];
        });
    }
980761
public function getRepositoryCredentials()
    {
        $endpoint = $this->vcs->runLocally('currentEndpoint');
        $user = $this->bash->runLocally('whoami');

        return $this->askQuestions('vcs', [
            'repository' => ['Where is your code located?', $endpoint],
            'username' => ['What is the username for it?', $user],
            'password' => 'And the password?',
        ]);
    }
71211
public static function getList()
    {
        $app = Application::getFacadeApplication();
        $em = $app->make(EntityManagerInterface::class);

        return $em->getRepository(ThumbnailTypeEntity::class)->findBy([], ['ftTypeWidth' => 'asc']);
    }
45258
public function toArray(): array
    {
        return [
            "clientFilename" => $this->getClientFilename(),
            "unverifiedContentType" => $this->error ? "" : $this->getContentType(true),
            "verifiedContentType" => $this->error ? "" : $this->getContentType(),
            "size" => $this->error ? 0 : $this->getSize(),
            "tempPath" => $this->error ? "" : $this->getTempPath(),
            "error" => $this->error ? $this->error->getMessage() : "",
        ];
    }
469879
protected function getRepositoryCredentials()
    {
        $config = (array) $this->config->getContextually('vcs');
        $credentials = (array) $this->localStorage->get('credentials');

        return array_merge($config, $credentials);
    }
454728
public function getReadme(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/readme',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
    }
639122
public function getScopes()
    {
        $scopes = array();
        $repositories = $this->getEntityRepositories($this->_scope_identifier);

        foreach ($repositories as $repository) {
            $scopes[] = array('repository' => $repository,'type' => $this->_scope_type);
        }

        return $scopes;
    }
188101
public function getArray()
    {
        $parsed = @parse_ini_file($this->context, true);

        if (! $parsed) {
            throw new InvalidFileException('Unable to parse invalid INI file at ' . $this->context);
        }

        return $parsed;
    }
850613
public function getDefAsArray()
    {
        return array_replace(
            [
                'name'              => $this->getName(),
                'type'              => $this->getType(),
                'exposedName'       => $this->getName(),
                'doctrineType'      => $this->getTypeDoctrine(),
                'serializerType'    => $this->getTypeSerializer(),
                'relType'           => self::REL_TYPE_EMBED,
                'isClassType'       => true,
                'constraints'       => [],
                'required'          => false,
                'searchable'        => 0,
            ],
            $this->definition === null ? [
                'required'          => $this->isRequired()
            ] : [
                'exposedName'       => $this->definition->getExposeAs() ?: $this->getName(),
                'title'             => $this->definition->getTitle(),
                'description'       => $this->definition->getDescription(),
                'readOnly'          => $this->definition->getReadOnly(),
                'required'          => $this->definition->getRequired(),
                'searchable'        => $this->definition->getSearchable(),
                'constraints'       => array_map(
                    [Utils\ConstraintNormalizer::class, 'normalize'],
                    $this->definition->getConstraints()
                ),
            ]
        );
    }
706780
public function getLinks() : Array
    {
        if( ! $this->isJsonCheck() || $this->refresh === true )
        {
            $result = $this->getApiResult();

            if( ! is_object($result) )
            {
                throw new Exception\BadRequestURLException($this->address);
            }

            $this->putJsonContent($result);
        }

        $result = $this->decodeArrrayJsonContent();

        return $this->convertArrayByKeyValues($result);
    }
146145
public function getManagedEntities()
    {
        $entities = array();
        /** @var \Symfony\Component\HttpKernel\Bundle\BundleInterface $bundle */
        foreach ($this->kernel->getBundles() as $bundle) {
            $entityPath = $bundle->getPath() . '/Entity';
            if (is_dir($entityPath)) {
                $iter = new \RegexIterator(
                    new \RecursiveIteratorIterator(
                        new \RecursiveDirectoryIterator($entityPath)
                    ),
                    '/\.php$/'
                );

                foreach ($iter as $file) {
                    $entityName = substr(
                        ltrim(str_replace(realpath($entityPath), '', realpath($file->getPathname())), '/'),
                        0,
                        -4
                    );

                    $alias = Str::classname(get_class($bundle)) . ':' . str_replace('/', '\\', $entityName);
                    try {
                        $repos = $this->doctrine->getRepository($alias);

                        $className     = $repos->getClassName();
                        $classMetaData = $this->metadata->getMetadataForClass($className);
                        foreach ($classMetaData->propertyMetadata as $property => $metadata) {
                            if (isset($metadata->fileManager)) {
                                $entities[] = $alias;
                                break;
                            }
                        }
                    } catch (\Exception $e) {
                    }
                }
            }
        }

        return $entities;
    }
6056
public function toArray()
    {
        return [
            'fallback'    => $this->fallback,
            'text'        => $this->text,
            'pretext'     => $this->preText,
            'color'       => $this->color,
            'footer'      => $this->footer,
            'mrkdwn_in'   => $this->useMarkdown ? ['text', 'pretext', 'footer'] : [],
            'footer_icon' => $this->footerIcon,
            'ts'          => $this->timestamp ? $this->timestamp->getTimestamp() : null,
            'image_url'   => $this->imageUrl,
            'thumb_url'   => $this->thumbUrl,
            'title'       => $this->title,
            'title_link'  => $this->titleLink,
            'author_name' => $this->authorName,
            'author_link' => $this->authorLink,
            'author_icon' => $this->authorIcon,
            'callback_id' => $this->callbackId,
            'fields'      => $this->fields->map(function (AttachmentField $field) {
                return $field->toArray();
            })->toArray(),
            'actions'     => $this->actions->map(function (AttachmentAction $action) {
                return $action->toArray();
            })->toArray(),
        ];
    }
249756
public function loadFaqs() : array
    {
        return $this->repository->matching(
            $this->repository->criteria()
                ->orderByAsc(Faq::ORDER_TO_DISPLAY)
        );
    }
44677
private function readBundleConfiguration(): array
    {
        $configurationFilePath = $this->getApplicationDir() . '/config/bundles.yml';
        if (!is_readable($configurationFilePath)) {
            throw new \RuntimeException('The file "' . $configurationFilePath . '" could not be read.', 1504272377);
        }

        return Yaml::parse(file_get_contents($configurationFilePath));
    }
126535
public function getArray()
    {
        try {
            $parsed = YamlParser::parse(file_get_contents($this->context));
        } catch (ParseException $e) {
            throw new InvalidFileException($e->getMessage());
        }

        if (! is_array($parsed)) {
            throw new InvalidFileException('Unable to parse invalid YAML file at ' . $this->context);
        }

        return $parsed;
    }
1296456
public function listRepositoryEvents(): array
    {
        return $this->getApi()->request($this->getApi()
                                             ->sprintf('/repos/:owner/:repo/events', $this->getActivity()->getOwner(),
                                                 $this->getActivity()->getRepo()));
    }