phpcr/src/PHPCR/Observation/EventInterface.php
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.
\PHPCR\Observation\EventInterface
- Api
Constants
NODE_ADDED
= 1
- 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
NODE_REMOVED
= 2
- 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
PROPERTY_ADDED
= 4
- 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
PROPERTY_REMOVED
= 8
- 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
PROPERTY_CHANGED
= 16
- 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
NODE_MOVED
= 32
- 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
Methods
getDate() : 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.
Type | Description |
---|---|
integer | The date when the change was persisted that caused this event (milliseconds since epoch). |
Exception | Description |
---|---|
\PHPCR\RepositoryException | if an error occurs. |
- Api
getIdentifier() : 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.
Type | Description |
---|---|
string | The identifier associated with this event or null. |
Exception | Description |
---|---|
\PHPCR\RepositoryException | if an error occurs. |
- Api
getInfo() : 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.
Type | Description |
---|---|
array | A list containing parameter information for instances of a NODE_MOVED event. |
Exception | Description |
---|---|
\PHPCR\RepositoryException | if an error occurs. |
- Api
getPath() : 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.
Type | Description |
---|---|
string | The absolute path associated with this event or null. |
Exception | Description |
---|---|
\PHPCR\RepositoryException | if an error occurs. |
- Api
getType() : 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
Type | Description |
---|---|
integer | the type of this event. |
- Api
getUserData() : string
Returns the user data set through ObservationManagerInterface::setUserData() on the ObservationManager bound to the Session that caused the event.
Type | Description |
---|---|
string | The user data string. |
Exception | Description |
---|---|
\PHPCR\RepositoryException | if an error occurs. |
- Api