PHP Class Falcon, Falcon

"팔콘 데이터저장소 엔진"은 MySQL을 기반으로 하는 NoSQL 엔진 입니다. 모든 입력, 출력이 JSON 문서로 되어 있어 웹 애플리케이션, 스마트폰 애플케이션 개발에 용의 합니다. 이 엔진은 소규모 애플리케이션에 적합 합니다.
ファイルを表示 Open project: rmccue/Falcon Class Usage Examples

Protected Properties

Property Type Description
$connectors
$handler

Public Methods

Method Description
add_schedule ( $schedules ) Add a more frequent cron schedule
bootstrap ( )
check_inbox ( )
convert_html_to_text ( string $html ) : string Convert the post content to text
get_connectors ( )
get_from_address ( ) : string Get the From address
get_handler_class ( string | null $type = null ) Get the registered handler class for a certain type
get_handlers ( ) : array Get all available handlers
get_hash ( integer $post_id, WP_User $user, $site_id ) : string Get the verification hash for a post and user
get_option ( $key, $default = false )
get_reply_address ( integer $post_id, WP_User $user, $site_id = null ) : string Get the reply-to address for a post and user
is_enabled_for_site ( integer $site_id = null ) : boolean Is Falcon enabled for this site?
is_network_mode ( ) : boolean Is Falcon in network mode?
notify_invalid ( WP_User $user, $title ) Notify the user of an invalid reply
post_callback ( )
should_send_async ( ) : boolean Should notifications be sent asynchronously?

Protected Methods

Method Description
get_available_connectors ( ) : array Get available connectors
get_handler ( ) : bbSubscriptions_Handler Get a mail handler based on the config

Method Details

add_schedule() public static method

We need to check the inbox much more regularly than hourly, so here we do it every minute instead.
public static add_schedule ( $schedules )

bootstrap() public static method

public static bootstrap ( )

check_inbox() public static method

public static check_inbox ( )

convert_html_to_text() public static method

Convert the post content to text
public static convert_html_to_text ( string $html ) : string
$html string HTML to convert
return string Text version of the content

get_available_connectors() protected static method

Get available connectors
protected static get_available_connectors ( ) : array
return array

get_connectors() public static method

public static get_connectors ( )

get_from_address() public static method

Defaults to the same default email as wp_mail(), including filters
public static get_from_address ( ) : string
return string Full email address

get_handler() protected static method

Get a mail handler based on the config
protected static get_handler ( ) : bbSubscriptions_Handler
return bbSubscriptions_Handler

get_handler_class() public static method

Get the registered handler class for a certain type
public static get_handler_class ( string | null $type = null )
$type string | null Type to get, defaults to the option

get_handlers() public static method

Get all available handlers
public static get_handlers ( ) : array
return array Associative array of identifier => handler class

get_hash() public static method

Uses a HMAC rather than a straight hash to avoid vulnerabilities.
See also: http://benlog.com/articles/2008/06/19/dont-hash-secrets/
See also: http://blog.jcoglan.com/2012/06/09/why-you-should-never-use-hash-functions-for-message-authentication/
public static get_hash ( integer $post_id, WP_User $user, $site_id ) : string
$post_id integer Post ID
$user WP_User User object
return string Verification hash (10 characters long)

get_option() public static method

public static get_option ( $key, $default = false )

get_reply_address() public static method

Get the reply-to address for a post and user
public static get_reply_address ( integer $post_id, WP_User $user, $site_id = null ) : string
$post_id integer Post ID
$user WP_User User object
return string Full email address

is_enabled_for_site() public static method

When Falcon is used in network mode, it can be toggled per-site. Avoid using this to determine whether to hook in, instead use it inside your hook callbacks to determine whether to run.
public static is_enabled_for_site ( integer $site_id = null ) : boolean
$site_id integer Site to check. Default is current site.
return boolean

is_network_mode() public static method

Network mode is used when Falcon is network-activated, and moves some of the settings to the network admin for super admins instead. It also adds UI to allow enabling per-site.
public static is_network_mode ( ) : boolean
return boolean

notify_invalid() public static method

Notify the user of an invalid reply
public static notify_invalid ( WP_User $user, $title )
$user WP_User User that supposedly sent the email

post_callback() public static method

public static post_callback ( )

should_send_async() public static method

Should notifications be sent asynchronously?
public static should_send_async ( ) : boolean
return boolean

Property Details

$connectors protected_oe static_oe property

protected static $connectors

$handler protected_oe static_oe property

protected static $handler