forked from doctrine/phpcr-odm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request doctrine#72 from doctrine/add-parent-annotation-wi…
…th_cleanups Add parent annotation with cleanups
- Loading branch information
Showing
36 changed files
with
773 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?php | ||
|
||
namespace Doctrine\ODM\PHPCR\Document; | ||
|
||
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCRODM; | ||
|
||
/** | ||
* This class represents an arbitrary node | ||
* | ||
* It is used as a default document, for example with the ParentDocument annotation. | ||
* You can not use this to create nodes as it has no type annotation. | ||
* | ||
* @PHPCRODM\Document(alias="odm_generic") | ||
*/ | ||
class Generic | ||
{ | ||
/** @PHPCRODM\Id */ | ||
protected $id; | ||
|
||
/** @PHPCRODM\Node */ | ||
protected $node; | ||
|
||
/** @PHPCRODM\Nodename */ | ||
protected $nodename; | ||
|
||
/** @PHPCRODM\ParentDocument */ | ||
protected $parent; | ||
|
||
/** @PHPCRODM\Children */ | ||
protected $children; | ||
|
||
/** @PHPCRODM\Referrers */ | ||
protected $referrers; | ||
|
||
/** | ||
* Id (path) of this document | ||
* | ||
* @return string the id | ||
*/ | ||
public function getId() | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* The node name of the document. | ||
* | ||
* @return string | ||
*/ | ||
public function getNodename() | ||
{ | ||
return $this->nodename; | ||
} | ||
|
||
/** | ||
* The parent document of this document. | ||
* | ||
* If there is information on the document type, the document is of the | ||
* specified type, otherwise it will be a Generic document | ||
* | ||
* @return object Document | ||
*/ | ||
public function getParent() | ||
{ | ||
return $this->parent; | ||
} | ||
|
||
/** | ||
* The children documents of this document | ||
* | ||
* If there is information on the document type, the documents are of the | ||
* specified type, otherwise they will be Generic documents | ||
* | ||
* @return object documents | ||
*/ | ||
public function getChildren() | ||
{ | ||
return $this->children; | ||
} | ||
|
||
/** | ||
* The documents having a reference to this document | ||
* | ||
* If there is information on the document type, the documents are of the | ||
* specified type, otherwise they will be Generic documents | ||
* | ||
* @return string | ||
*/ | ||
public function getReferrers() | ||
{ | ||
return $this->referrers; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.