PHP 클래스 WDS_WP_REST_API\Discover

파일 보기 프로젝트 열기: webdevstudios/wds-wp-rest-api-connect 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$args
$legacy
$root
$site WDS_WP_REST_API\Discover\Site Site object
$uri

공개 메소드들

메소드 설명
__construct ( string $uri, $args = [], boolean $legacy = false ) : Site | null Discover the WordPress API from a URI.
request ( string $uri, string $request_type = 'get' ) : mixed Make a request using the WP http API
site ( ) : Site Get the Site object

보호된 메소드들

메소드 설명
discover_api_root ( ) : string | null Discover the API root from an address.
get_index_information ( ) : Site Get the index information from a site.
parse_link_header ( string $link ) : array Parse a Link header into attributes.

메소드 상세

__construct() 공개 메소드

Discover the WordPress API from a URI.
부터: 0.2.1
public __construct ( string $uri, $args = [], boolean $legacy = false ) : Site | null
$uri string URI to start the search from.
$legacy boolean Should we check for the legacy API too?
리턴 WDS_WP_REST_API\Discover\Site | null Site data if available, null if not a WP site.

discover_api_root() 보호된 메소드

Discover the API root from an address.
부터: 0.2.1
protected discover_api_root ( ) : string | null
리턴 string | null API root URL if found, null if no API is available.

get_index_information() 보호된 메소드

Get the index information from a site.
부터: 0.2.1
protected get_index_information ( ) : Site
리턴 WDS_WP_REST_API\Discover\Site Data from the index for the site.

request() 공개 메소드

Make a request using the WP http API
부터: 0.2.2
public request ( string $uri, string $request_type = 'get' ) : mixed
$uri string URI to make request to
$request_type string Type of request. Defaults to 'get'
리턴 mixed Return of the request.

site() 공개 메소드

Get the Site object
public site ( ) : Site
리턴 WDS_WP_REST_API\Discover\Site

프로퍼티 상세

$args 보호되어 있는 프로퍼티

protected $args

$legacy 보호되어 있는 프로퍼티

protected $legacy

$root 보호되어 있는 프로퍼티

protected $root

$site 보호되어 있는 프로퍼티

Site object
protected Site,WDS_WP_REST_API\Discover $site
리턴 WDS_WP_REST_API\Discover\Site

$uri 보호되어 있는 프로퍼티

protected $uri