Builds persistence domain object.

@param \eZ\Publish\API\Repository\Values\Content\URLAlias $urlAlias

@return \eZ\Publish\SPI\Persistence\Content\URLAlias
170907
protected function buildSPIUrlAlias(URLAlias $urlAlias)
    {
        return new SPIURLAlias(
            array(
                'id' => $urlAlias->id,
                'type' => $urlAlias->type,
                'destination' => $urlAlias->destination,
                'isCustom' => $urlAlias->isCustom,
            )
        );
    }
789853
private function buildUrls(
        Portal $portal,
        Environment $environment,
        Url $url,
        $segments,
        $urlAddress
    ) {
        if ($url->getLanguage()) {
            $language = $url->getLanguage();
            $country = $url->getCountry();
            $locale = $language . ($country ? '_' . $country : '');

            $this->buildUrlFullMatch(
                $portal,
                $environment,
                $segments,
                [],
                $urlAddress,
                $portal->getLocalization($locale),
                $url
            );
        } else {
            // create all the urls for every localization/segment combination
            foreach ($portal->getLocalizations() as $localization) {
                $language = $url->getLanguage() ? $url->getLanguage() : $localization->getLanguage();
                $country = $url->getCountry() ? $url->getCountry() : $localization->getCountry();

                $replacers = [
                    ReplacerInterface::REPLACER_LANGUAGE => $language,
                    ReplacerInterface::REPLACER_COUNTRY => $country,
                    ReplacerInterface::REPLACER_LOCALIZATION => $localization->getLocale(Localization::DASH),
                ];

                $this->buildUrlFullMatch(
                    $portal,
                    $environment,
                    $segments,
                    $replacers,
                    $urlAddress,
                    $localization,
                    $url
                );
            }
            $this->buildUrlPartialMatch(
                $portal,
                $environment,
                $urlAddress,
                $url
            );
        }
    }
389720
protected function registerPersistences()
    {
        $this->registerSession();
        $this->registerCookie();

        $this->app->singleton( 'sentinel.persistence', function ( $app )
        {
            return new IlluminatePersistenceRepository(
                $app['sentinel.session'],
                $app['sentinel.cookie'],
                Persistence::class
            );
        } );
    }
1086948
public function setLogoUris(array $logoUris = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$logoUris', $logoUris, __NAMESPACE__ . '\TaggedValue');

        $this->logoUris = $logoUris;

        return $this;
    }
1102601
public function loadUrlAliasData(array $urlHashes)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\SelectQuery */
        $query = $this->dbHandler->createSelectQuery();

        $count = count($urlHashes);
        foreach ($urlHashes as $level => $urlPartHash) {
            $tableName = $this->table . ($level === $count - 1 ? '' : $level);

            if ($level === $count - 1) {
                $query->select(
                    $this->dbHandler->quoteColumn('id', $tableName),
                    $this->dbHandler->quoteColumn('link', $tableName),
                    $this->dbHandler->quoteColumn('is_alias', $tableName),
                    $this->dbHandler->quoteColumn('alias_redirects', $tableName),
                    $this->dbHandler->quoteColumn('is_original', $tableName),
                    $this->dbHandler->quoteColumn('action', $tableName),
                    $this->dbHandler->quoteColumn('action_type', $tableName),
                    $this->dbHandler->quoteColumn('lang_mask', $tableName),
                    $this->dbHandler->quoteColumn('text', $tableName),
                    $this->dbHandler->quoteColumn('parent', $tableName),
                    $this->dbHandler->quoteColumn('text_md5', $tableName)
                )->from(
                    $this->dbHandler->quoteTable($this->table)
                );
            } else {
                $query->select(
                    $this->dbHandler->aliasedColumn($query, 'id', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'link', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'is_alias', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'alias_redirects', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'is_original', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'action', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'action_type', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'lang_mask', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'text', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'parent', $tableName),
                    $this->dbHandler->aliasedColumn($query, 'text_md5', $tableName)
                )->from(
                    $query->alias($this->table, $tableName)
                );
            }

            $query->where(
                $query->expr->lAnd(
                    $query->expr->eq(
                        $this->dbHandler->quoteColumn('text_md5', $tableName),
                        $query->bindValue($urlPartHash, null, \PDO::PARAM_STR)
                    ),
                    $query->expr->eq(
                        $this->dbHandler->quoteColumn('parent', $tableName),
                        // root entry has parent column set to 0
                        isset($previousTableName) ? $this->dbHandler->quoteColumn('link', $previousTableName) : $query->bindValue(0, null, \PDO::PARAM_INT)
                    )
                )
            );

            $previousTableName = $tableName;
        }
        $query->limit(1);

        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetch(\PDO::FETCH_ASSOC);
    }
1133349
protected function registerPersistences()
    {
        $this->registerSession();
        $this->registerCookie();

        $this->app->singleton('sentinel.persistence', function ($app) {
            $config = $app['config']->get('cartalyst.sentinel.persistences');

            return new IlluminatePersistenceRepository(
                $app['sentinel.session'], $app['sentinel.cookie'], $config['model'], $config['single']
            );
        });
    }
629532
private function buildUrl($urlVariables)
	{
		$url = '';

		foreach($urlVariables as $variable => $value) {
			$url .= '&'.$variable.'='.($value);
		}
		return config('location.google-maps-url').env('GOOGLE_KEY').$url;
	}
312171
public static function fromIdentifierOrAlias($identifierOrAlias)
    {
        $alias = $identifierOrAlias;
        $identifier = 'Plain';

        if (isset(self::$aliasToIdentifierMap[$identifierOrAlias])) {
            $identifier = self::$aliasToIdentifierMap[$identifierOrAlias];
        }

        return new static($alias, $identifier);
    }
248810
protected function buildPersistenceConfiguration(array $persistenceConfig)
    {
        $persistence = array();

        if (!array_key_exists(self::PROVIDER, $persistenceConfig)) {
            $persistence[self::PROVIDER] = 'null';
        } else {
            $persistence[self::PROVIDER] = $persistenceConfig[self::PROVIDER];
        }

        if (array_key_exists(self::PARAMS, $persistenceConfig)) {
            if (!is_array($persistenceConfig[self::PARAMS])) {
                $persistenceConfig[self::PARAMS] = $this->toArray($persistenceConfig[self::PARAMS]);
            }

            $persistence[self::PARAMS] = $persistenceConfig[self::PARAMS];

            if (array_key_exists(self::DIR, $persistence[self::PARAMS])) {
                $persistence[self::PARAMS][self::DIR] = $this->getFullPath($persistence[self::PARAMS][self::DIR]);
            }
        }

        return $persistence;
    }
269610
public function createSentinel()
    {
        $persistence = $this->createPersistence();
        $users       = $this->createUsers();
        $roles       = $this->createRoles();
        $activations = $this->createActivations();
        $dispatcher  = $this->getEventDispatcher();

        $sentinel = new Sentinel(
            $persistence,
            $users,
            $roles,
            $activations,
            $dispatcher
        );

        $throttle = $this->createThrottling();

        $ipAddress = $this->getIpAddress();

        $checkpoints = $this->createCheckpoints($activations, $throttle, $ipAddress);

        foreach ($checkpoints as $key => $checkpoint) {
            $sentinel->addCheckpoint($key, $checkpoint);
        }

        $reminders = $this->createReminders($users);

        $sentinel->setActivationRepository($activations);

        $sentinel->setReminderRepository($reminders);

        $sentinel->setThrottleRepository($throttle);

        return $sentinel;
    }
906534
protected function buildDomainObject(SPIUrl $data)
    {
        return new URL([
            'id' => $data->id,
            'url' => $data->url,
            'isValid' => $data->isValid,
            'lastChecked' => $this->createDateTime($data->lastChecked),
            'created' => $this->createDateTime($data->created),
            'modified' => $this->createDateTime($data->modified),
        ]);
    }
1219235
public function setDomains($domains)
    {
        if (is_array($domains)) {
            foreach ($domains as $domain) {
                $this->setDomains($domain);
            }
            return $this;
        }

        $this->domains[] = $domains;

        return $this;
    }
627185
private function loadConversations(string $uri, ConversationRequest $conversationRequest): PagedCollection
    {
        /** @var HalPagedResources $conversationResources */
        $conversationResources = $this->restClient->getResources(Conversation::class, 'conversations', $uri);
        $conversations = $conversationResources->map(function (HalResource $customerResource) use ($conversationRequest) {
            return $this->hydrateConversationWithSubEntities($customerResource, $conversationRequest);
        });

        return new PagedCollection(
            $conversations,
            $conversationResources->getPageMetadata(),
            $conversationResources->getLinks(),
            function (string $uri) use ($conversationRequest) {
                return $this->loadConversations($uri, $conversationRequest);
            }
        );
    }
1210289
public function deleteURLAlias($urlAliasId)
    {
        $this->urlAliasService->removeAliases(
            array(
                $this->urlAliasService->load($urlAliasId),
            )
        );

        return new Values\NoContent();
    }
88808
protected function storeGlobalAlias(UrlAlias $alias)
    {
        $paths = $this->combinePaths($alias->pathData);

        foreach ($paths as $path) {
            $this->storeGlobalAliasPath(
                $alias->destination,
                $path,
                reset($alias->languageCodes),
                $alias->alwaysAvailable,
                $alias->forward
            );
        }

        return count($paths);
    }
298359
protected function createPersistence()
    {
        $session = $this->createSession();

        $cookie = $this->createCookie();

        $model = $this->config['persistences']['model'];

        $single = $this->config['persistences']['single'];

        return new IlluminatePersistenceRepository($session, $cookie, $model, $single);
    }
868745
public function build(): SetBlockedURLsRequest
	{
		$instance = new SetBlockedURLsRequest();
		if ($this->urls === null) {
			throw new BuilderException('Property [urls] is required.');
		}
		$instance->urls = $this->urls;
		return $instance;
	}