PHP Class Content_Objects_Manager, horde

Author: Chuck Hagenbuch ([email protected])
Author: Michael Rubinsky ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_db Horde_Db_Adapter Database adapter
$_tables array Tables
$_typeManager Content_Types_Manager Type manager

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
_t ( string $tableType ) : string Shortcut for getting a table name.

Method Details

__construct() public méthode

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
Résultat Content_Objects_Manager

_t() protected méthode

Shortcut for getting a table name.
protected _t ( string $tableType ) : string
$tableType string
Résultat string Configured table name.

delete() public méthode

public delete ( )

delete() public méthode

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() public méthode

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
Résultat array An array of object_ids.

exists() public méthode

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.
Résultat mixed Either a hash of object_id => object_names or false if the object(s) do not exist.

Property Details

$_db protected_oe property

Database adapter
protected Horde_Db_Adapter $_db
Résultat Horde_Db_Adapter

$_tables protected_oe property

Tables
protected array $_tables
Résultat array

$_typeManager protected_oe property

Type manager
protected Content_Types_Manager $_typeManager
Résultat Content_Types_Manager