private function identifyFromHeaders($url)
    {
        if (!strpos($url, '.')) {
            throw new \InvalidArgumentException('Invalid URL: ' . $url);
        }
        if (strpos($url, '//') === false) {
            $url = 'https://' . $url;
        }
        $result = ['projectId' => null, 'environmentId' => null];
        $cluster = $this->getClusterHeader($url);
        if (!empty($cluster)) {
            $this->debug('Identified project cluster: ' . $cluster);
            list($result['projectId'], $result['environmentId']) = explode('-', $cluster, 2);
        }

        return $result;
    }
private function identifyFromHeaders($url)
    {
        if (!strpos($url, '.')) {
            throw new \InvalidArgumentException('Invalid URL: ' . $url);
        }
        if (strpos($url, '//') === false) {
            $url = 'https://' . $url;
        }
        $result = ['projectId' => null, 'environmentId' => null];
        $cluster = $this->getClusterHeader($url);
        if (!empty($cluster)) {
            $this->debug('Identified project cluster: ' . $cluster);
            list($result['projectId'], $result['environmentId']) = explode('-', $cluster, 2);
        }

        return $result;
    }
private function identifyFromHeaders ( $ url ) { if ( ! strpos ( $ url , '.' ) ) { throw new \ InvalidArgumentException ( 'Invalid URL: ' . $ url ) ; } if ( strpos ( $ url , '//' ) === false ) { $ url = 'https://' . $ url ; } $ result = [ 'projectId' => null , 'environmentId' => null ] ; $ cluster = $ this -> getClusterHeader ( $ url ) ; if ( ! empty ( $ cluster ) ) { $ this -> debug ( 'Identified project cluster: ' . $ cluster ) ; list ( $ result [ 'projectId' ] , $ result [ 'environmentId' ] ) = explode ( '-' , $ cluster , 2 ) ; } return $ result ; }
Identify a project and environment from a URL's response headers.

@param string $url

@return array
Identify a project and environment from a URL s response headers .