public function identify($url)
    {
        $result = $this->parseProjectId($url);
        if (empty($result['projectId']) && strpos($url, '.') !== false) {
            $result = $this->identifyFromHeaders($url);
        }
        if (empty($result['projectId'])) {
            throw new InvalidArgumentException('Failed to identify project ID from URL: <error>' . $url . '</error>');
        }

        return $result + ['environmentId' => null, 'host' => null, 'appId' => null];
    }
public function identify($url)
    {
        $result = $this->parseProjectId($url);
        if (empty($result['projectId']) && strpos($url, '.') !== false) {
            $result = $this->identifyFromHeaders($url);
        }
        if (empty($result['projectId'])) {
            throw new InvalidArgumentException('Failed to identify project ID from URL: <error>' . $url . '</error>');
        }

        return $result + ['environmentId' => null, 'host' => null, 'appId' => null];
    }
public function identify ( $ url ) { $ result = $ this -> parseProjectId ( $ url ) ; if ( empty ( $ result [ 'projectId' ] ) && strpos ( $ url , '.' ) !== false ) { $ result = $ this -> identifyFromHeaders ( $ url ) ; } if ( empty ( $ result [ 'projectId' ] ) ) { throw new InvalidArgumentException ( 'Failed to identify project ID from URL: <error>' . $ url . '</error>' ) ; } return $ result + [ 'environmentId' => null , 'host' => null , 'appId' => null ] ; }
Identify a project from an ID or URL.

@param string $url

@return array
An array containing keys 'projectId', 'environmentId', 'host', and
'appId'. At least the 'projectId' will be populated.
Identify a project from an ID or URL .