PHP 클래스 Content_Objects_Manager, horde

저자: Chuck Hagenbuch ([email protected])
저자: Michael Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_db Horde_Db_Adapter Database adapter
$_tables array Tables
$_typeManager Content_Types_Manager Type manager

공개 메소드들

메소드 설명
__construct ( Horde_Db_Adapter $db, Content_Types_Manager $typeManager ) : Content_Objects_Manager Constructor
delete ( )
delete ( array $objects, string $type ) Remove the object.
ensureObjects ( mixed $objects, mixed $type ) : array Ensure that an array of objects exist in storage. Create any that don't, return object_ids for all. All objects in the $objects array must be of the same content type.
exists ( $objects, mixed $type ) : mixed Check for object existence without causing the objects to be created.

보호된 메소드들

메소드 설명
_t ( string $tableType ) : string Shortcut for getting a table name.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Horde_Db_Adapter $db, Content_Types_Manager $typeManager ) : Content_Objects_Manager
$db Horde_Db_Adapter The db adapter
$typeManager Content_Types_Manager A content type manager
리턴 Content_Objects_Manager

_t() 보호된 메소드

Shortcut for getting a table name.
protected _t ( string $tableType ) : string
$tableType string
리턴 string Configured table name.

delete() 공개 메소드

public delete ( )

delete() 공개 메소드

NOTE: This does not ensure any references to this object were removed. E.g., does not remove any tags etc... That is client code's responsibility.
public delete ( array $objects, string $type )
$objects array An array of object identifiers to delete.
$type string The type of the objects. All objects must be of the same type.

ensureObjects() 공개 메소드

Ensure that an array of objects exist in storage. Create any that don't, return object_ids for all. All objects in the $objects array must be of the same content type.
public ensureObjects ( mixed $objects, mixed $type ) : array
$objects mixed An array of objects (or single obejct value). Values typed as an integer are assumed to already be an object_id.
$type mixed Either a string type_name or integer type_id
리턴 array An array of object_ids.

exists() 공개 메소드

Helps save queries for things like tags when we already know the object doesn't yet exist in rampage tables.
public exists ( $objects, mixed $type ) : mixed
$type mixed A type identifier. Either a string type name or the integer type_id.
리턴 mixed Either a hash of object_id => object_names or false if the object(s) do not exist.

프로퍼티 상세

$_db 보호되어 있는 프로퍼티

Database adapter
protected Horde_Db_Adapter $_db
리턴 Horde_Db_Adapter

$_tables 보호되어 있는 프로퍼티

Tables
protected array $_tables
리턴 array

$_typeManager 보호되어 있는 프로퍼티

Type manager
protected Content_Types_Manager $_typeManager
리턴 Content_Types_Manager