webCOMAND

io_comand_repo\repo

A repository provides methods to inspect, query and operate on a COMAND repository.

A repository connection is typically established with comand::repo() or comand::connect().

Constants

  • SOFTWARE_VERSION - The current repository software version, like '3.00.140229'.
  • CONTENT_TYPE_NAMESPACE - PHP namespace where models are found: '\comand\models';

The following constants are used with the preload_content_types option of comand::connect().

  • PRELOAD_ALL_CONTENT_TYPES - Load all content types in the repository.  This will be slow for large repositories, but if most or all content types will be accessed in this connection, it is the most efficient way to connect because they will all be preloaded upon connection for subsequent use.
  • PRELOAD_MIN_CONTENT_TYPES - Load only the bare minimum content types required to bootstrap the repository (Object, Content, Type, Data Type, Content Type, Content Type Field, Layout Type, Template, User, Content Type Authorization).
  • PRELOAD_COMMON_CONTENT_TYPES (default) - Load commonly used content types, beyond just the bare minimum to balance connection speed with subsequent query performance for most cases.

Properties

  • Comand - The comand instance this repository is connected to.

  • engine - Provides methods for low-level access to the repository's underlying storage engine (database).

  • start_up_options - Options array passed to the repository to connect.

  • SuperUser - The COMAND User with System Administration authorization used to connect to the repository.

  • SystemLog - The primary event log for the repository, where errors, warnings and notices logged while performing actions can be accessed.

  • SystemTask - If this repository connection is associated with a background task, this will reference the corresponding SystemTask.  Otherwise it will be NULL.

  • TransactionTimestamp - Timestamp the connection to this repository was made, and therefore the temporal time to be used for all queries and updates.

  • User - The COMAND User connected to the repository.  All queries and other actions performed on the repository will be preformed with this user's authorizations.

  • UserOfRecord - The COMAND User to be responsible for updates.  In other words, when an object is updated, this user will be associated with the change in version control and various logs.

  • version - The software version number (ie. 3.00.140229) of the repository.  If the repository is local (on the same server as the API used to access it), it will be the same as the COMAND_VERSION constant defined in comand.php.  However, it may be a different for remote repositories.