00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00021 class IdentifiableObject implements Identifiable
00022 {
00023 protected $id = null;
00024
00028 public static function wrap($id)
00029 {
00030 $io = new self;
00031
00032 return $io->setId($id);
00033 }
00034
00035 public function getId()
00036 {
00037 if (
00038 $this->id instanceof Identifier
00039 && $this->id->isFinalized()
00040 )
00041 return $this->id->getId();
00042 else
00043 return $this->id;
00044 }
00045
00049 public function setId($id)
00050 {
00051 $this->id = $id;
00052
00053 return $this;
00054 }
00055 }
00056 ?>