PHP Класс Content_Objects_Manager, horde

Автор: Chuck Hagenbuch ([email protected])
Автор: Michael Rubinsky ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_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