Get profile

If no "profile" value has been set, this method will
set and return a default "profile" value,
if any such value is available

@see getDefaultProfile()

@return string|null profile or null if no profile has been set
436721
public function getProfile() : ?string 
    {
        if ( ! $this->hasProfile()) {
            $this->setProfile($this->getDefaultProfile());
        }
        return $this->profile;
    }
1095013
public function getActiveProfile()
    {
        $profiles = $this->getProfiles();
        $profileId = $this->getProfileId();

        if (!is_array($profiles)) {
            throw new \Exception('<fg=red>The config is invalid</fg=red>');
        }

        foreach ($profiles as $profile) {
            if ($profile['profileId'] == $profileId) {
                return $profile;
            }
        }
    }
684747
public function get($key, $default = null)
    {
        if ( ! array_key_exists($key, $this->settings)) {
            return $this->getDefault($key, $default);
        }

        return $this->settings[$key];
    }
673214
public function getProfile()
    {
        $request = new GetAccountProfileRequest([$this->identifier]);
        $response = new GetAccountProfileResponse();
        return $this->client->sendRequest($request, $response);
    }
869127
public function info() : object
    {
        if ($this->profile === null) {
            $this->profile = $this->get(sprintf(self::USERS_ENDPOINT . 'profile2', $this->onlineIdParameter), [
                'fields' => 'npId,onlineId,accountId,avatarUrls,plus,aboutMe,languagesUsed,trophySummary(@default,progress,earnedTrophies),isOfficiallyVerified,personalDetail(@default,profilePictureUrls),personalDetailSharing,personalDetailSharingRequestMessageFlag,primaryOnlineStatus,presences(@titleInfo,hasBroadcastData),friendRelation,requestMessageFlag,blocking,mutualFriendsCount,following,followerCount,friendsCount,followingUsersCount&avatarSizes=m,xl&profilePictureSizes=m,xl&languagesUsedLanguageSet=set3&psVitaTitleIcon=circled&titleIconSize=s'
            ])->profile;
        }
        return $this->profile;
    }
1241037
public static function getDefault()
    {
        if (isset(self::$instance)) {
            return self::$instance;
        }
        self::$instance = new self();
        return self::$instance;
    }
915831
public function getDefaultAction()
    {
        // Determine the appliccable action
        if ( ! $this->default_action) {
            return null;
        }

        $actions = $this->default_action;

        if ( ! is_array($actions)) {
            $actions = [
                new ModelActionReferenceData([
                    'strategy' => $actions,
                ]),
            ];
        }

        $core = $this->getCore();


        foreach ($actions as $action) {

            $permissions = $action->permissions();

            if (    ! count($permissions)
                ||  $core->auth()->user()->isAdmin()
                ||  $core->auth()->user()->can($permissions)
            ) {
                return $action;
            }
        }

        return null;
    }
224277
public function getDefaultParent()
    {
        if ($defaultParents = $this->config()->default_parents) {
            
            if (isset($defaultParents[$this->getClass()])) {
                
                $result = $this->processValue($defaultParents[$this->getClass()]);
                
                if ($result instanceof DataObject) {
                    return $result->ID;
                }
                
                return $result;
                
            }
            
        }
    }
1199438
public function getProfiler()
    {
        if (null === $this->profiler) {
            $class = $this->profilerClass;
            $profiler = new $class();
            if (!empty($this->profilerConfiguration)) {
                $profiler->setConfiguration($this->profilerConfiguration);
            }
            $this->profiler = $profiler;
        }

        return $this->profiler;
    }
318038
public function getDefault()
    {
        if ($this->default) {
            return $this->default;
        }
        if (!empty($this->values)) {
            return reset($this->values);
        }
        return null;
    }
930746
public function defaultValue()
    {
        if ($this->default === null) {
            return null;
        }

        $default = $this->default;

        if (strstr($this->default, '{{') && strstr($this->default, '}}')) {
            // Parse special replacements (if we have one)
            $default = str_replace("{{CURRENT_TIME}}", date('c', time()), $default);
        }

        return $default;
    }
1217537
public function getDefaultValue()
    {
        $default = $this->_default;

        if ($default && !$this->isScalar()) {
            $default = $default instanceof AnDomainAttributeInterface ? clone $default :
                        AnDomainAttribute::getInstance($this->_type);
        }

        return $default;
    }
204625
protected static JSONObject getDefaultProfile() throws Exception {
        String uri = DEFAULT_BASE_URL + BASE_PROFILE;
        try {
            JSONObject response = new JSONObject(doGet(uri, 60000));
            JSONArray profiles = response.getJSONArray("profiles");

            if (profiles.length() > 0) {
                return profiles.getJSONObject(0);
            }
        } catch (Exception e) {
            // some sort of error
            throw new Exception("Could not create a proxy client");
        }

        return null;
    }
993954
public function getDefaultTitle()
    {
        if (empty($this->title_default)) {
            return $this->config->get('defaults.title', null);
        }

        return $this->title_default;
    }
1050161
public function getProfile($name){
        if(isset($this->profiles[$name])){
            return $this->profiles[$name];
        }
        return NULL;
    }
902643
public function getDefaultValue()
    {
        if (!$this->hasDefaultValue()) {
            return null;
        }

        if ($this->defaultValue instanceof FragmentInterface) {
            //Defined as SQL piece
            return $this->defaultValue;
        }

        if (in_array($this->getAbstractType(), ['time', 'date', 'datetime', 'timestamp'])) {
            return $this->formatDatetime($this->getAbstractType(), $this->defaultValue);
        }

        switch ($this->getType()) {
            case 'int':
                return (int)$this->defaultValue;
            case 'float':
                return (float)$this->defaultValue;
            case 'bool':
                if (is_string($this->defaultValue) && strtolower($this->defaultValue) == 'false') {
                    return false;
                }

                return (bool)$this->defaultValue;
        }

        return (string)$this->defaultValue;
    }
486940
public function getWebsite()
        {
            return isset($this->_data[self::PROFILE][self::WEBSITE]) ? $this->_data[self::PROFILE][self::WEBSITE] : null;
        }