phpcr/src/PHPCR/Observation/EventInterface.php

Show: PublicProtectedPrivateinherited
    Table of Contents
    This file is part of the PHPCR API and was originally ported from the Java JCR API to PHP by Karsten Dambekalns for the FLOW3 project.

    Copyright 2008-2011 Karsten Dambekalns karsten@typo3.org

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0
    

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    License
    Apache Software License 2.0  
    Link
    http://phpcr.github.com/  

    \PHPCR\Observation\EventInterface

    Package: Default
    An event fired by the observation mechanism.
    Api
     

    Constants

    >VConstant  NODE_ADDED = 1
    Generated on persist when a node is added.
    • getPath() returns the absolute path of the node that was added.
    • getIdentifier() returns the identifier of the node that was added.
    • getInfo() returns an empty array
    Api
     
    >VConstant  NODE_REMOVED = 2
    Generated on persist when a node is removed.
    • getPath() returns the absolute path of the node that was removed.
    • getIdentifier() returns the identifier of the node that was removed.
    • getInfo() returns an empty array
    Api
     
    >VConstant  PROPERTY_ADDED = 4
    Generated on persist when a property is added.
    • getPath() returns the absolute path of the property that was added.
    • getIdentifier() returns the identifier of the parent node of the property that was added.
    • getInfo() returns an empty array
    Api
     
    >VConstant  PROPERTY_REMOVED = 8
    Generated on persist when a property is removed.
    • getPath() returns the absolute path of the property that was removed.
    • getIdentifier() returns the identifier of the parent node of the property that was removed.
    • getInfo() returns an empty array
    Api
     
    >VConstant  PROPERTY_CHANGED = 16
    Generated on persist when a property is changed.
    • getPath() returns the absolute path of the property that was changed.
    • getIdentifier() returns the identifier of the parent node of the property that was changed.
    • getInfo() returns an empty array
    Api
     
    >VConstant  NODE_MOVED = 32
    Generated on persist when a node is moved.
    • getPath() returns the absolute path of the destination of the move.
    • getIdentifier() returns the identifier of the moved node.
    • getInfo() If the method that caused this event was a SessionInterface::move() or WorkspaceInterface::move() then the returned array has keys srcAbsPath and destAbsPath with values corresponding to the parameters passed to the move() method.

      If the method that caused this event was a NodeInterface::orderBefore() then the returned aray has keys srcChildRelPath and destChildRelPath with values corresponding to the parameters passed to the orderBefore() method.

    Api
     
    >VConstant  PERSIST = 64
    If event bundling is supported, this event is used to indicate a bundle boundary within the event journal.
    • getPath() returns null.
    • getIdentifier() returns null.
    • getInfo() returns an empty array.
    Api
     

    Methods

    methodpublicgetDate() : integer

    Returns the date when the change was persisted that caused this event.

    The date is represented as a millisecond value that is an offset from the Epoch, January 1, 1970 00:00:00.000 GMT (Gregorian). The granularity of the returned value is implementation dependent.

    Returns
    TypeDescription
    integerThe date when the change was persisted that caused this event (milliseconds since epoch).
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    methodpublicgetIdentifier() : string

    Returns the identifier associated with this event or null if this event has no associated identifier.

    The meaning of the associated identifier depends upon the type of the event. See event type constants above.

    Returns
    TypeDescription
    stringThe identifier associated with this event or null.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    methodpublicgetInfo() : array

    Returns the information map associated with this event.

    The meaning of the map depends upon the type of the event. See event type constants above.

    Returns
    TypeDescription
    arrayA list containing parameter information for instances of a NODE_MOVED event.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    methodpublicgetPath() : string

    Returns the absolute path associated with this event or null if this event has no associated identifier.

    The meaning of the associated path depends upon the type of the event. See event type constants above.

    Returns
    TypeDescription
    stringThe absolute path associated with this event or null.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    methodpublicgetType() : integer

    Returns the type of this event: a constant defined by this interface.

    One of: - NODE_ADDED - NODE_REMOVED - PROPERTY_ADDED - PROPERTY_REMOVED - PROPERTY_CHANGED - NODE_MOVED - PERSIST

    Returns
    TypeDescription
    integerthe type of this event.
    Details
    Api
     
    methodpublicgetUserData() : string

    Returns the user data set through ObservationManagerInterface::setUserData() on the ObservationManager bound to the Session that caused the event.

    Returns
    TypeDescription
    stringThe user data string.
    Throws
    ExceptionDescription
    \PHPCR\RepositoryExceptionif an error occurs.
    Details
    Api
     
    methodpublicgetUserID() : string

    Returns the user ID connected with this event.

    This is the string returned by SessionInterface::getUserID() of the session that caused the event.

    Returns
    TypeDescription
    stringThe identifier of the user connected to the event.
    Details
    Api
     
    Documentation was generated by phpDocumentor 2.0.0a12.