Toggle navigation
wCMF 4.0
Guides
Getting started
Architecture
Model
Persistence
Presentation
Configuration
Security
I18n & l10n
Tests
API
Code
Support
wcmf_older
wcmf
src
wcmf
lib
model
NullNode.php
1
<?php
2
/**
3
* wCMF - wemove Content Management Framework
4
* Copyright (C) 2005-2015 wemove digital solutions GmbH
5
*
6
* Licensed under the terms of the MIT License.
7
*
8
* See the LICENSE file distributed with this work for
9
* additional information.
10
*/
11
namespace
wcmf\lib\model
;
12
13
use
wcmf\lib\model\Node
;
14
use
wcmf\lib\persistence\ObjectId
;
15
use
wcmf\lib\persistence\PersistentObject
;
16
17
/**
18
* NullNode is an implementation of the NullObject pattern,
19
* It inherits all functionality from Node (acts like a Node)
20
* and is only distinguishable from a Node instance by it's class or oid.
21
* If a Node's parent is a NullNode instance, than they should be separated
22
* in the data store (e.g. the foreign key should be null, if allowed by the database).
23
* NullNode child instances should be ignored.
24
*
25
* @author ingo herwig <ingo@wemove.com>
26
*/
27
class
NullNode
extends
Node
{
28
29
/**
30
* @see PersistentObject::getOID()
31
*/
32
public
function
getOID
() {
33
return
new
ObjectId
($this->_type, NULL);
34
}
35
}
36
?>
wcmf\lib\model
Node related interfaces and classes.
Definition:
namespaces.php:26
PersistentObject
wcmf\lib\persistence\ObjectId
ObjectId is the unique identifier of an object.
Definition:
ObjectId.php:27
wcmf\lib\model\NullNode
NullNode is an implementation of the NullObject pattern, It inherits all functionality from Node (act...
Definition:
NullNode.php:27
wcmf\lib\model\NullNode\getOID
getOID()
Definition:
NullNode.php:32
ObjectId
Node
wcmf\lib\model\Node
Node adds the concept of relations to PersistentObject.
Definition:
Node.php:34