PHP Класс Falcon, Falcon

"팔콘 데이터저장소 엔진"은 MySQL을 기반으로 하는 NoSQL 엔진 입니다. 모든 입력, 출력이 JSON 문서로 되어 있어 웹 애플리케이션, 스마트폰 애플케이션 개발에 용의 합니다. 이 엔진은 소규모 애플리케이션에 적합 합니다.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$connectors
$handler

Открытые методы

Метод Описание
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?

Защищенные методы

Метод Описание
get_available_connectors ( ) : array Get available connectors
get_handler ( ) : bbSubscriptions_Handler Get a mail handler based on the config

Описание методов

add_schedule() публичный статический Метод

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 bootstrap ( )

check_inbox() публичный статический Метод

public static check_inbox ( )

convert_html_to_text() публичный статический Метод

Convert the post content to text
public static convert_html_to_text ( string $html ) : string
$html string HTML to convert
Результат string Text version of the content

get_available_connectors() защищенный статический Метод

Get available connectors
protected static get_available_connectors ( ) : array
Результат array

get_connectors() публичный статический Метод

public static get_connectors ( )

get_from_address() публичный статический Метод

Defaults to the same default email as wp_mail(), including filters
public static get_from_address ( ) : string
Результат string Full email address

get_handler() защищенный статический Метод

Get a mail handler based on the config
protected static get_handler ( ) : bbSubscriptions_Handler
Результат bbSubscriptions_Handler

get_handler_class() публичный статический Метод

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() публичный статический Метод

Get all available handlers
public static get_handlers ( ) : array
Результат array Associative array of identifier => handler class

get_hash() публичный статический Метод

Uses a HMAC rather than a straight hash to avoid vulnerabilities.
См. также: http://benlog.com/articles/2008/06/19/dont-hash-secrets/
См. также: 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
Результат string Verification hash (10 characters long)

get_option() публичный статический Метод

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

get_reply_address() публичный статический Метод

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
Результат string Full email address

is_enabled_for_site() публичный статический Метод

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.
Результат boolean

is_network_mode() публичный статический Метод

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
Результат boolean

notify_invalid() публичный статический Метод

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 post_callback ( )

should_send_async() публичный статический Метод

Should notifications be sent asynchronously?
public static should_send_async ( ) : boolean
Результат boolean

Описание свойств

$connectors защищенное статическое свойство

protected static $connectors

$handler защищенное статическое свойство

protected static $handler