[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/SimplePie/src/ -> File.php (summary)

(no description)

File Size: 444 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

File:: (14 methods):
  __construct()
  get_permanent_uri()
  get_final_requested_uri()
  get_status_code()
  get_headers()
  has_header()
  get_header()
  with_header()
  get_header_line()
  get_body_content()
  maybe_update_headers()
  set_headers()
  flatten_headers()
  fromResponse()


Class: File  - X-Ref

Used for fetching remote files and reading local files

Supports HTTP 1.0 via cURL or fsockopen, with spotty HTTP 1.1 support

This class can be overloaded with {@see \SimplePie\SimplePie::set_file_class()}

__construct(string $url, int $timeout = 10, int $redirects = 5, ?array $headers = null, ?string $useragent = null, bool $force_fsockopen = false, array $curl_options = [])   X-Ref

param: string $url
param: int $timeout
param: int $redirects
param: ?array<string, string> $headers
param: ?string $useragent
param: bool $force_fsockopen
param: array<int, mixed> $curl_options

get_permanent_uri()   X-Ref
No description

get_final_requested_uri()   X-Ref
No description

get_status_code()   X-Ref
No description

get_headers()   X-Ref
No description

has_header(string $name)   X-Ref
No description

get_header(string $name)   X-Ref
No description

with_header(string $name, $value)   X-Ref
No description

get_header_line(string $name)   X-Ref
No description

get_body_content()   X-Ref
No description

maybe_update_headers()   X-Ref
Check if the $headers property was changed and update the internal state accordingly.


set_headers(array $headers)   X-Ref
No description

flatten_headers(array $headers)   X-Ref
Converts PSR-7 compatible headers into a legacy format.

return: array<string, string>
param: array<string, non-empty-array<string>> $headers

fromResponse(Response $response)   X-Ref
Create a File instance from another Response

For BC reasons in some places there MUST be a `File` instance
instead of a `Response` implementation




Generated : Thu Sep 18 08:20:05 2025 Cross-referenced by PHPXref