PHP 클래스 Apple_Actions\Index\Section

상속: extends Apple_Actions\API_Action
파일 보기 프로젝트 열기: alleyinteractive/apple-news

공개 메소드들

메소드 설명
__construct ( Settings $settings, string $section_id = null ) Constructor.
get_data ( string $key, string $default = null ) : mixed Get a specific element of section data from Apple News
get_sections ( ) : array Get all available sections.
perform ( ) : object Get the section data from Apple News.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Settings $settings, string $section_id = null )
$settings Settings
$section_id string

get_data() 공개 메소드

Get a specific element of section data from Apple News
public get_data ( string $key, string $default = null ) : mixed
$key string
$default string
리턴 mixed

get_sections() 공개 메소드

Cache for 5 minutes to avoid too many API requests.
public get_sections ( ) : array
리턴 array

perform() 공개 메소드

Get the section data from Apple News.
public perform ( ) : object
리턴 object