PHP 클래스 UtilityController, vanilla

상속: extends BaseController
파일 보기 프로젝트 열기: vanilla/vanilla

공개 프로퍼티들

프로퍼티 타입 설명
$Form Gdn_Form
$Uses Models to automatically instantiate.

보호된 프로퍼티들

프로퍼티 타입 설명
$specialHeaders Special-case HTTP headers that are otherwise unidentifiable as HTTP headers. Typically, HTTP headers in the $_SERVER array will be prefixed with HTTP_ or X_. These are not so we list them here for later reference.

공개 메소드들

메소드 설명
alive ( ) Signs of life.
fetchPageInfo ( $Url = '' ) Return some meta information about any page on the internet in JSON format.
getFeed ( $type = 'news', $length = 5, $feedFormat = 'normal' ) Grab a feed from the mothership.
initialize ( ) Runs before every call to this controller.
ping ( )
set ( string $UserPropertyColumn = '', string $Name = '', string $Value = '', string $TransientKey = '' ) Allows the setting of data into one of two serialized data columns on the user table: Preferences and Attributes.
setClientHour ( $ClientHour = '', string $TransientKey = '' ) Set the user's timezone (hour offset).
setHourOffset ( )
sort ( ) Set the sort order for data on an arbitrary database table.
sprites ( )
structure ( ) Update database structure based on current definitions in each app's structure.php file.
update ( ) Run a structure update on the database.
upgrade ( ) Because people try this a lot and get confused.

비공개 메소드들

메소드 설명
runStructure ( boolean $captureOnly = true ) Run the database structure or /utility/structure.

메소드 상세

alive() 공개 메소드

Signs of life.
부터: 2.0.?
public alive ( )

fetchPageInfo() 공개 메소드

Return some meta information about any page on the internet in JSON format.
public fetchPageInfo ( $Url = '' )

getFeed() 공개 메소드

Grab a feed from the mothership.
부터: 2.0.?
public getFeed ( $type = 'news', $length = 5, $feedFormat = 'normal' )

initialize() 공개 메소드

Runs before every call to this controller.
public initialize ( )

ping() 공개 메소드

public ping ( )

set() 공개 메소드

The method expects "Name" & "Value" to be in the $_POST collection. This method always saves to the row of the user id performing this action (ie. $Session->UserID). The type of property column being saved should be specified in the url: i.e. /dashboard/utility/set/preference/name/value/transientKey or /dashboard/utility/set/attribute/name/value/transientKey
부터: 2.0.0
public set ( string $UserPropertyColumn = '', string $Name = '', string $Value = '', string $TransientKey = '' )
$UserPropertyColumn string The type of value being saved: preference or attribute.
$Name string The name of the property being saved.
$Value string The value of the property being saved.
$TransientKey string A unique transient key to authenticate that the user intended to perform this action.

setClientHour() 공개 메소드

Set the user's timezone (hour offset).
부터: 2.0.0
public setClientHour ( $ClientHour = '', string $TransientKey = '' )
$TransientKey string Security token.

setHourOffset() 공개 메소드

public setHourOffset ( )

sort() 공개 메소드

Expect post values TransientKey, Target (redirect URL), Table (database table name), and TableID (an array of sort order => unique ID).
부터: 2.0.0
public sort ( )

sprites() 공개 메소드

public sprites ( )

structure() 공개 메소드

Update database structure based on current definitions in each app's structure.php file.
public structure ( )

update() 공개 메소드

It should always be possible to call this method, even if no database tables exist yet. A working forum database should be built from scratch where none exists. Therefore, it can have no reliance on existing data calls, or they must be able to fail gracefully.
부터: 2.0.?
public update ( )

upgrade() 공개 메소드

Because people try this a lot and get confused.
부터: 2.0.18
public upgrade ( )

프로퍼티 상세

$Form 공개적으로 프로퍼티

public Gdn_Form $Form
리턴 Gdn_Form

$Uses 공개적으로 프로퍼티

Models to automatically instantiate.
public $Uses

$specialHeaders 보호되어 있는 정적으로 프로퍼티

Special-case HTTP headers that are otherwise unidentifiable as HTTP headers. Typically, HTTP headers in the $_SERVER array will be prefixed with HTTP_ or X_. These are not so we list them here for later reference.
protected static $specialHeaders