PHP 클래스 Habari\Tags

상속: extends Vocabulary
파일 보기 프로젝트 열기: habari/system 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$object_type
$vocabulary

공개 메소드들

메소드 설명
get_by_frequency ( integer $limit = null, mixed $post_type = null, integer $min = 1, integer $max = null, mixed $search = null, $orderby = 'count', $inverse = false ) : Tags Returns a list of terms from this vocabulary ordered by frequency of use on the post type specified
get_by_id ( integer $tag ) : Tag Returns a Tag object based on a supplied ID
get_by_slug ( string $tag ) : Tag Return a tag based on a tag's text
get_by_text ( string $tag ) : Tag Return a tag based on a tag's text
get_one ( string | integer $tag ) : Tag Return a tag based on an id, tag text or slug
object_type ( ) : String Returns the default type Tags uses
parse_url_tags ( String $tags, $objectify = false ) : Array. Parse tag parameters from a URL string
save_associations ( $terms, $object_id, $object_type = 'post' ) : boolean. Save the tags associated to this object into the terms and object_terms tables
search ( string $q ) : Terms Return a terms that match a substring criteria
vocabulary ( ) : Vocabulary Returns the tags vocabulary

메소드 상세

get_by_frequency() 공개 정적인 메소드

Returns a list of terms from this vocabulary ordered by frequency of use on the post type specified
public static get_by_frequency ( integer $limit = null, mixed $post_type = null, integer $min = 1, integer $max = null, mixed $search = null, $orderby = 'count', $inverse = false ) : Tags
$limit integer If supplied, limits the results to the specified number
$post_type mixed If a name or id of a post type is supplied, limits the results to the terms applying to that type
$min integer If supplied, limits the results to tags associated with at least this number of posts
$max integer If supplied, limits the results to tags associated with at most this number of posts
$search mixed If supplied, limits the results to tags containing that value in their display string
리턴 Tags A Tags instance containing the terms, each having an additional property of "count" that tells how many times the term was used

get_by_id() 공개 정적인 메소드

Returns a Tag object based on a supplied ID
public static get_by_id ( integer $tag ) : Tag
$tag integer The ID of the tag to retrieve
리턴 Tag A Tag object

get_by_slug() 공개 정적인 메소드

Return a tag based on a tag's text
public static get_by_slug ( string $tag ) : Tag
$tag string The tag slug
리턴 Tag A Tag object

get_by_text() 공개 정적인 메소드

Return a tag based on a tag's text
public static get_by_text ( string $tag ) : Tag
$tag string The tag's text (not slug)
리턴 Tag A Tag object

get_one() 공개 정적인 메소드

Return a tag based on an id, tag text or slug
public static get_one ( string | integer $tag ) : Tag
$tag string | integer A tag's text, slug, or id
리턴 Tag The tag object

object_type() 공개 정적인 메소드

Returns the default type Tags uses
public static object_type ( ) : String
리턴 String The default type name

parse_url_tags() 공개 정적인 메소드

Parse tag parameters from a URL string
public static parse_url_tags ( String $tags, $objectify = false ) : Array.
$tags String The URL parameter string
리턴 Array.

save_associations() 공개 정적인 메소드

Save the tags associated to this object into the terms and object_terms tables
public static save_associations ( $terms, $object_id, $object_type = 'post' ) : boolean.
리턴 boolean.

vocabulary() 공개 정적인 메소드

Returns the tags vocabulary
public static vocabulary ( ) : Vocabulary
리턴 Vocabulary The tags vocabulary

프로퍼티 상세

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

protected static $object_type

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

protected static $vocabulary