PrimitiveNoValue.class.php

Go to the documentation of this file.
00001 <?php
00002 /****************************************************************************
00003  *   Copyright (C) 2009 by Denis M. Gabaidulin                              *
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 
00015     final class PrimitiveNoValue extends BasePrimitive
00016     {
00020         public function setValue($value)
00021         {
00022             Assert::isUnreachable('No value!');
00023             
00024             return $this;
00025         }
00026         
00027         public function setDefaultValue($default)
00028         {
00029             Assert::isUnreachable('No default value!');
00030             
00031             return $this;
00032         }
00033         
00034         public function setRawValue($raw)
00035         {
00036             Assert::isUnreachable('No raw value!');
00037             
00038             return $this;
00039         }
00040         
00041         public function importValue($value)
00042         {
00043             Assert::isUnreachable('No import value!');
00044             
00045             return $this;
00046         }
00047         
00048         public function import($scope)
00049         {
00050             if (
00051                 key_exists($this->name, $scope)
00052                 && $scope[$this->name] == null
00053             )
00054                 return $this->imported = true;
00055             
00056             return null;
00057         }
00058     }
00059 ?>