Overview

Namespaces

  • Genetsis
    • core
      • activityid
      • user
  • None

Classes

  • ActivityApi
  • AutoloaderClass
  • Config
  • Identity
  • URLBuilder
  • UserApi
  • Overview
  • Namespace
  • Class

Class URLBuilder

This class is used to build the links to different services of Genetsis ID.

Namespace: Genetsis
Package: Genetsis
Category: Helper
Version: 2.0
Located at URLBuilder.php
Methods summary
public static string
# getUrlLogin( string $scope = null, string $social = null, string $urlCallback = null )

Returns the link for login process.

Returns the link for login process.

Parameters

$scope

Section-key Identifier of the web client. The section-key is located in "oauthconf.xml" file. If it's NULL, the default section will be used.

$social
  • to force login with social network. Optional. Values 'facebook', 'twitter'
$urlCallback

Url for callback. A list of valid url is defined in "oauthconf.xml" If it's NULL default url will be used.

Returns

string
The URL for login process.
public static string
# getUrlRegister( string $scope = null, string $urlCallback = null )

Returns the link for register form page.

Returns the link for register form page.

Parameters

$scope

Section-key Identifier of the web client. The section-key is located in "oauthconf.xml" file. If it's NULL, the default section will be used.

$urlCallback

Url for callback. A list of url is defined in "oauthconf.xml" If it's NULL the default url will be used.

Returns

string
The URL for register process.
public static string
# getUrlEditAccount( string $scope = null, string $urlCallback = null )

Returns the link for edit account form page.

Returns the link for edit account form page.

Parameters

$scope

Section-key Identifier of the web client. The section-key is located in "oauthconf.xml" file. If it's NULL, the default section will be used.

$urlCallback

Url for callback. A list of url is defined in "oauthconf.xml" If it's NULL the default url will be used.

Returns

string
The URL for edit account process.
public static string
# getUrlCompleteAccount( string $scope = null )

Returns the URL to complete the account for a section (scope) given.

Returns the URL to complete the account for a section (scope) given.

Parameters

$scope

Section-key Identifier of the web client. The section-key is located in "oauthconf.xml" file.

Returns

string
The URL for complete process.
public static string
# buildSignupPromotionUrl( string $scope )

This method is commonly used for promotions or sweepstakes: if a user wants to participate in a promotion, the web client must ensure that the user is logged and have all the fields filled in order to let him participate.

This method is commonly used for promotions or sweepstakes: if a user wants to participate in a promotion, the web client must ensure that the user is logged and have all the fields filled in order to let him participate.

  • If it is not logged, will return the login URL.
  • If it is logged the method will check - If the user have not enough PII to access to a section, returns the URL needed to force a consumer to fill all the PII needed to enter into a section - Else will return false (user logged and completed)

The "scope" (section) is a group of fields configured in Genetsis ID for a web client.

A section can be also defined as a "part" (section) of the website (web client) that only can be accesed by a user who have filled a set of personal information configured in Genetsis ID (all of the fields required for that section).

Parameters

$scope

Identifier of the web client. The section-key is located in "oauthconf.xml" file.

Returns

string

With generated URL. If the user is not connected, will return login URL.

Throws

Exception
if scope is empty.
public boolean
# setCallbackRegister( string $url )

Set url for callback in redirectiosn section with regiter type.

Set url for callback in redirectiosn section with regiter type.

Parameters

$url

Returns

boolean
public boolean
# setCallbackConfirmUser( string $url )

Set url for callback in redirections section with confirm user type.

Set url for callback in redirections section with confirm user type.

Parameters

$url

Returns

boolean
public boolean
# setCallbackPostLogin( string $url )

Set url for callback in redirections section with confirm postLogin type.

Set url for callback in redirections section with confirm postLogin type.

Parameters

$url

Returns

boolean
public boolean
# setCallbackPostChangeEmail( string $url )

Set url for callback in redirections section with postChangeEmail type.

Set url for callback in redirections section with postChangeEmail type.

Parameters

$url

Returns

boolean
public boolean
# setCallbackPostEditAccount( string $url )

Set url for callback in redirections section with postEditAccount type.

Set url for callback in redirections section with postEditAccount type.

Parameters

$url

Returns

boolean
API documentation generated by ApiGen