# Identifier.class.php

Go to the documentation of this file.

    00001 <?php
    00002 /***************************************************************************
    00003  *   Copyright (C) 2005-2007 by Garmonbozia Research Group                 *
    00004  *                                                                         *
    00005  *   This program is free software; you can redistribute it and/or modify  *
    00006  *   it under the terms of the GNU Lesser General Public License as        *
    00007  *   published by the Free Software Foundation; either version 3 of the    *
    00008  *   License, or (at your option) any later version.                       *
    00009  *                                                                         *
    00010  ***************************************************************************/
    00011
    00018     final class Identifier implements Identifiable
    00019     {
    00020         private $id     = null;
    00021         private $final  = false;
    00022
    00026         public static function create()
    00027         {
    00028             return new self;
    00029         }
    00030
    00034         public static function wrap($id)
    00035         {
    00036             return self::create()->setId($id);
    00037         }
    00038
    00039         public function getId()
    00040         {
    00041             return $this->id;
    00042         }
    00043
    00047         public function setId($id)
    00048         {
    00049             $this->id = $id;
    00050
    00051             return $this;
    00052         }
    00053
    00057         public function finalize()
    00058         {
    00059             $this->final = true;
    00060
    00061             return $this;
    00062         }
    00063
    00064         public function isFinalized()
    00065         {
    00066             return $this->final;
    00067         }
    00068     }
    00069 ?>