Takes the "global ID" created by self::toGlobalId, and returns the type name and ID
used to create it.

@param $globalId
@return array
344193
public static function fromGlobalId($globalId) {
        $unbasedGlobalId = base64_decode($globalId);
        $delimiterPos = strpos($unbasedGlobalId, GLOBAL_ID_DELIMITER);
        return [
            'type' => substr($unbasedGlobalId, 0, $delimiterPos),
            'id' => substr($unbasedGlobalId, $delimiterPos + 1)
        ];
    }
20906
protected function getGlobalArguments()
    {
        $args = array(
                '--non-interactive' => true,
        );

        if ($this->username) $args['--username'] = $this->username;
        if ($this->password) $args['--password'] = $this->password;
        return $args;
    }
1170304
public function actionNavLangItem($navId, $langId)
    {
        $item = NavItem::find()->with('nav')->where(['nav_id' => $navId, 'lang_id' => $langId])->one();
        if ($item) {
            return [
                'error' => false,
                'item' => $item->toArray(),
                'nav' => $item->nav->toArray(),
                'typeData' => ($item->nav_item_type == 1) ? NavItemPage::getVersionList($item->id) : ArrayHelper::typeCast($item->getType()->toArray()),
            ];
        }
        
        return ['error' => true];
    }
141652
public function getGlobals() {
		$globals = [
			'post' => get_post( get_the_ID() )
		];

		/**
		 * Modify globals or add custom.
		 *
		 * @param array $globals
		 */
		$globals = apply_filters( 'digster/globals', $globals );
		$globals = is_array( $globals ) ? $globals : [];

		return $globals;
	}
424224
public static function objectType($fieldId)
    {
        //====================================================================//
        // decode
        $result = self::isIdField($fieldId);
        if (empty($result)) {
            return false;
        }
        //====================================================================//
        // Return Field Identifier
        return   $result['ObjectType'];
    }
1048727
public function loadLanguageById($languageId)
    {
        $language = $this->languageHandler->load($languageId);

        return $this->buildDomainObject($language);
    }
21892
public static function anonymousId()
    {
        if ( self::$anonymousId === null )
        {
            $ini = eZINI::instance();
            self::$anonymousId = (int)$ini->variable( 'UserSettings', 'AnonymousUserID' );
            $GLOBALS['eZUserBuiltins'] = array( self::$anonymousId );
        }
        return self::$anonymousId;
    }
1066179
public function createdBy($guid)
    {
        $model = $this->noInitModel;
        if (!is_string($model->createdByAttribute)) {
            return $this;
        }
        if ($guid instanceof BaseUserModel) {
            $guid = $guid->getGUID();
        }
        return $this->andWhere([$model->createdByAttribute => new Binary($guid, Binary::TYPE_UUID)]);
    }
336834
public function exportById($id): array
    {
        $globalSet = Craft::$app->globals->getSetById((int) $id);

        return $this->export($globalSet);
    }
444594
public function getParameterName($rootId = null)
    {
        $rootId = $rootId ?: $GLOBALS['objPage']->rootId;

        if (!$rootId || null === ($rootPage = PageModel::findByPk($rootId))) {
            return '';
        }

        return $rootPage->newsCategories_param ?: 'category';
    }
118365
public static function createUOID($gid = NULL, $id = NULL)
	{
		if($gid == NULL)
			$gid = Sonic::getContextGlobalID();
		
		if($id == NULL)
			$id = Random::getUniqueRandom();
		
		$uoid = $gid . UOID::SEPARATOR . $id;
		
		return $uoid;
	}
739067
public static function propertyIdsForGroup($propertyGroupId)
    {
        if (isset(static::$groupIdToPropertyIds[$propertyGroupId])) {
            return static::$groupIdToPropertyIds[$propertyGroupId];
        }
        $ids = Yii::$app->cache->lazy(
            function () use ($propertyGroupId) {
                $query = new Query();
                return array_map(
                    function ($item) {
                        return intval($item);
                    },
                    $query
                        ->select(['property_id'])
                        ->from(PropertyPropertyGroup::tableName())
                        ->where(['property_group_id' => $propertyGroupId])
                        ->orderBy(['sort_order_group_properties' => SORT_ASC])
                        ->column(static::getDb())
                );

            },
            "PropertyIdsForGroup:$propertyGroupId",
            86400,
            [
                NamingHelper::getObjectTag(PropertyGroup::class, $propertyGroupId),
            ]
        );
        static::$groupIdToPropertyIds[$propertyGroupId] = $ids;
        return static::$groupIdToPropertyIds[$propertyGroupId];
    }
490481
public function id($id)
    {
        $parts = array_merge(array($this->namespace), func_get_args());
        return trim(implode(self::$namespaceSeparator, $parts), self::$namespaceSeparator);
    }
219496
public function decodeType(string $globalID): string
    {
        [$type, $id] = self::decode($globalID);

        return $type;
    }
141939
public function GetID($DiscussionID) {
      $Session = Gdn::Session();
      $this->FireEvent('BeforeGetID');
      $Discussion = $this->SQL
         ->Select('d.*')
         ->Select('w.DateLastViewed, w.Dismissed, w.Bookmarked')
         ->Select('w.CountComments', '', 'CountCommentWatch')
         ->Select('d.DateLastComment', '', 'LastDate')
         ->Select('d.LastCommentUserID', '', 'LastUserID')
         ->From('Discussion d')
         ->Join('UserDiscussion w', 'd.DiscussionID = w.DiscussionID and w.UserID = '.$Session->UserID, 'left')
         ->Where('d.DiscussionID', $DiscussionID)
         ->Get()
         ->FirstRow();
      
      if (!$Discussion)
         return $Discussion;
      
      // Join in the users.
      $Discussion = array($Discussion);
      Gdn::UserModel()->JoinUsers($Discussion, array('LastUserID', 'InsertUserID'));
      $Discussion = $Discussion[0];
      
      $this->Calculate($Discussion);
      
      if (C('Vanilla.Views.Denormalize', FALSE))
         $this->AddDenormalizedViews($Discussion);
		
		return $Discussion;
   }
1333159
public function getRecipeById($id)
    {
        $result = [
            'className' => (isset($this->classNameById[$id])) ?
                $this->classNameById[$id] :
                null,
            'arguments' => (isset($this->argumentsById[$id])) ?
                $this->argumentsById[$id] :
                null,
            'constructor' => (isset($this->constructorById[$id])) ?
                $this->constructorById[$id] :
                null,
            'dependencies' => (isset($this->dependenciesById[$id])) ?
                $this->dependenciesById[$id] :
                null,
        ];

        return $result;
    }
508534
public static function createFromGlobals(array $globals)
    {
        $env = new \Sofi\Base\Collection($globals);
        if (is_array($env['slim.files']) && $env->has('slim.files')) {
            return $env['slim.files'];
        } elseif (isset($_FILES)) {
            return static::parseUploadedFiles($_FILES);
        }
        return [];
    }