propel-map
[ class tree: propel-map ] [ index: propel-map ] [ all elements ]

Source for file ValidatorMap.php

Documentation is available at ValidatorMap.php

  1. <?php
  2. /*
  3.  *  $Id: ValidatorMap.php 521 2007-01-05 13:29:36Z heltem $
  4.  *
  5.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  6.  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  7.  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  8.  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  9.  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  10.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  11.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  12.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  13.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  14.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  15.  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  16.  *
  17.  * This software consists of voluntary contributions made by many individuals
  18.  * and is licensed under the LGPL. For more information please see
  19.  * <http://propel.phpdb.org>.
  20.  */
  21.  
  22. /**
  23.  * ValidatorMap is used to model a column validator.
  24.  *
  25.  * GENERAL NOTE
  26.  * ------------
  27.  * The propel.map classes are abstract building-block classes for modeling
  28.  * the database at runtime.  These classes are similar (a lite version) to the
  29.  * propel.engine.database.model classes, which are build-time modeling classes.
  30.  * These classes in themselves do not do any database metadata lookups, but instead
  31.  * are used by the MapBuilder classes that were generated for your datamodel. The
  32.  * MapBuilder that was created for your datamodel build a representation of your
  33.  * database by creating instances of the DatabaseMap, TableMap, ColumnMap, etc.
  34.  * classes. See propel/templates/om/php5/MapBuilder.tpl and the classes generated
  35.  * by that template for your datamodel to further understand how these are put
  36.  * together.
  37.  *
  38.  * @author     Michael Aichler <aichler@mediacluster.de>
  39.  * @version    $Revision: 521 $
  40.  * @package    propel.map
  41.  */
  42. {
  43.     /** rule name of this validator */
  44.     private $name;
  45.     /** the dot-path to class to use for validator */
  46.     private $classname;
  47.     /** value to check against */
  48.     private $value;
  49.     /** execption message thrown on invalid input */
  50.     private $message;
  51.     /** related column */
  52.     private $column;
  53.  
  54.     public function __construct($containingColumn)
  55.     {
  56.         $this->column $containingColumn;
  57.     }
  58.  
  59.     public function getColumn()
  60.     {
  61.         return $this->column;
  62.     }
  63.  
  64.     public function getColumnName()
  65.     {
  66.         return $this->column->getColumnName();
  67.     }
  68.  
  69.     public function setName($name)
  70.     {
  71.         $this->name $name;
  72.     }
  73.  
  74.     public function setClass($classname)
  75.     {
  76.         $this->classname $classname;
  77.     }
  78.  
  79.     public function setValue($value)
  80.     {
  81.         $this->value $value;
  82.     }
  83.  
  84.     public function setMessage($message)
  85.     {
  86.         $this->message $message;
  87.     }
  88.  
  89.     public function getName()
  90.     {
  91.         return $this->name;
  92.     }
  93.  
  94.     public function getClass()
  95.     {
  96.         return $this->classname;
  97.     }
  98.  
  99.     public function getValue()
  100.     {
  101.         return $this->value;
  102.     }
  103.  
  104.     public function getMessage()
  105.     {
  106.         return $this->message;
  107.     }
  108. }

Documentation generated on Thu, 22 Nov 2007 03:33:57 +0000 by phpDocumentor 1.4.0