Fragen\GitHub_Updater\Bitbucket_API::get_remote_info PHP Метод

get_remote_info() публичный Метод

Read the remote file and parse headers.
public get_remote_info ( $file ) : boolean
$file
Результат boolean
    public function get_remote_info($file)
    {
        $response = isset($this->response[$file]) ? $this->response[$file] : false;
        if (!$response) {
            if (empty($this->type->branch)) {
                $this->type->branch = 'master';
            }
            $response = $this->api('/1.0/repositories/:owner/:repo/src/' . trailingslashit($this->type->branch) . $file);
            if ($response) {
                $contents = $response->data;
                $response = $this->get_file_headers($contents, $this->type->type);
                $this->set_transient($file, $response);
            }
        }
        if ($this->validate_response($response) || !is_array($response)) {
            return false;
        }
        $response['dot_org'] = $this->get_dot_org_data();
        $this->set_file_info($response);
        return true;
    }