Urn.class.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************************
00003  *   Copyright (C) 2007 by Ivan Y. Khvostishkov                            *
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 
00017     final class Urn extends GenericUri
00018     {
00019         protected $schemeSpecificPart   = null;
00020         
00021         protected $knownSubSchemes  = array(
00022             'urn'       => 'Urn',
00023             'mailto'    => 'Urn',
00024             'news'      => 'Urn',
00025             'isbn'      => 'Urn',
00026             'tel'       => 'Urn',
00027             'fax'       => 'Urn',
00028         );
00029         
00033         public static function create()
00034         {
00035             return new self;
00036         }
00037         
00038         public function getKnownSubSchemes()
00039         {
00040             return $this->knownSubSchemes;
00041         }
00042         
00043         public function isValid()
00044         {
00045             if (
00046                 $this->scheme === null
00047                 || $this->getAuthority() !== null
00048             )
00049                 return false;
00050             
00051             return parent::isValid();
00052         }
00053     }
00054 ?>