r2188 - in trunk/core/Form: . Filters Primitives

From: <voxusAT@ATshadanakar.org>
Date: Thu, 9 Nov 2006 14:40:28 +0300 (MSK)

Author: voxus
Date: 2006-11-09 14:40:28 +0300 (Thu, 09 Nov 2006)
New Revision: 2188

Modified:
   trunk/core/Form/Filter.class.php
   trunk/core/Form/Filters/FilterChain.class.php
   trunk/core/Form/Filters/HashFilter.class.php
   trunk/core/Form/Filters/PCREFilter.class.php
   trunk/core/Form/Filters/StringReplaceFilter.class.php
   trunk/core/Form/Filters/StripTagsFilter.class.php
   trunk/core/Form/Form.class.php
   trunk/core/Form/FormField.class.php
   trunk/core/Form/MappedForm.class.php
   trunk/core/Form/PlainForm.class.php
   trunk/core/Form/Primitive.class.php
   trunk/core/Form/Primitives/BasePrimitive.class.php
   trunk/core/Form/Primitives/ComplexPrimitive.class.php
   trunk/core/Form/Primitives/DateRangeList.class.php
   trunk/core/Form/Primitives/ExplodedPrimitive.class.php
   trunk/core/Form/Primitives/FiltrablePrimitive.class.php
   trunk/core/Form/Primitives/IdentifiablePrimitive.class.php
   trunk/core/Form/Primitives/PrimitiveDate.class.php
   trunk/core/Form/Primitives/PrimitiveEnumeration.class.php
   trunk/core/Form/Primitives/PrimitiveFile.class.php
   trunk/core/Form/Primitives/PrimitiveIdentifier.class.php
   trunk/core/Form/Primitives/PrimitiveImage.class.php
   trunk/core/Form/Primitives/PrimitiveList.class.php
   trunk/core/Form/Primitives/PrimitiveRange.class.php
   trunk/core/Form/Primitives/PrimitiveString.class.php
   trunk/core/Form/Primitives/PrimitiveTernary.class.php
   trunk/core/Form/Primitives/PrimitiveTime.class.php
   trunk/core/Form/Primitives/RangedPrimitive.class.php
   trunk/core/Form/RegulatedForm.class.php
Log:
+ return type hints @ core/Form

Modified: trunk/core/Form/Filter.class.php
===================================================================
--- trunk/core/Form/Filter.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Filter.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -17,6 +17,9 @@
         **/
         final class Filter extends StaticFactory
         {
+ /**
+ * @return FilterChain
+ **/
                 public static function textImport()
                 {
                         return
@@ -25,46 +28,73 @@
                                         add(Filter::stripTags());
                 }
                 
+ /**
+ * @return FilterChain
+ **/
                 public static function chain()
                 {
                         return new FilterChain();
                 }
                 
+ /**
+ * @return HashFilter
+ **/
                 public static function hash($binary = false)
                 {
                         return HashFilter::create($binary);
                 }
 
+ /**
+ * @return PCREFilter
+ **/
                 public static function pcre()
                 {
                         return PCREFilter::create();
                 }
 
+ /**
+ * @return TrimFilter
+ **/
                 public static function trim()
                 {
                         return Singleton::getInstance('TrimFilter');
                 }
 
+ /**
+ * @return StripTagsFilter
+ **/
                 public static function stripTags()
                 {
                         return StripTagsFilter::create();
                 }
 
+ /**
+ * @return HtmlSpecialCharsFilter
+ **/
                 public static function htmlSpecialChars()
                 {
                         return Singleton::getInstance('HtmlSpecialCharsFilter');
                 }
                 
+ /**
+ * @return UrlEncodeFilter
+ **/
                 public static function urlencode()
                 {
                         return Singleton::getInstance('UrlEncodeFilter');
                 }
                 
+ /**
+ * @return UrlDecodeFilter
+ **/
                 public static function urldecode()
                 {
                         return Singleton::getInstance('UrlDecodeFilter');
                 }
                 
+ /**
+ * @return StringReplaceFilter
+ **/
                 public static function replaceSymbols($search = null, $replace = null)
                 {
                         return StringReplaceFilter::create($search, $replace);

Modified: trunk/core/Form/Filters/FilterChain.class.php
===================================================================
--- trunk/core/Form/Filters/FilterChain.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Filters/FilterChain.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -19,17 +19,26 @@
         {
                 protected $chain = array();
 
+ /**
+ * @return FilterChain
+ **/
                 public static function create()
                 {
                         return new self;
                 }
                 
+ /**
+ * @return FilterChain
+ **/
                 public function add(Filtrator $filter)
                 {
                         $this->chain[] = $filter;
                         return $this;
                 }
 
+ /**
+ * @return FilterChain
+ **/
                 public function dropAll()
                 {
                         $this->chain = array();

Modified: trunk/core/Form/Filters/HashFilter.class.php
===================================================================
--- trunk/core/Form/Filters/HashFilter.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Filters/HashFilter.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -24,6 +24,9 @@
                         $this->binary = ($binary === true);
                 }
                 
+ /**
+ * @return HashFilter
+ **/
                 public static function create($binary = false)
                 {
                         return new self($binary);

Modified: trunk/core/Form/Filters/PCREFilter.class.php
===================================================================
--- trunk/core/Form/Filters/PCREFilter.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Filters/PCREFilter.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -18,11 +18,17 @@
                 private $search = null;
                 private $replace = null;
                 
+ /**
+ * @return PCREFilter
+ **/
                 public static function create()
                 {
                         return new self;
                 }
                 
+ /**
+ * @return PCREFilter
+ **/
                 public function setExpression($search, $replace)
                 {
                         $this->search = $search;

Modified: trunk/core/Form/Filters/StringReplaceFilter.class.php
===================================================================
--- trunk/core/Form/Filters/StringReplaceFilter.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Filters/StringReplaceFilter.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -20,6 +20,9 @@
                 
                 private $count = null;
                 
+ /**
+ * @return StringReplaceFilter
+ **/
                 public static function create($search = null, $replace = null)
                 {
                         return new self($search, $replace);
@@ -31,6 +34,9 @@
                         $this->replace = $replace;
                 }
                 
+ /**
+ * @return StringReplaceFilter
+ **/
                 public function setSearch($search)
                 {
                         $this->search = $search;
@@ -43,6 +49,9 @@
                         return $this->search;
                 }
                 
+ /**
+ * @return StringReplaceFilter
+ **/
                 public function setReplace($replace)
                 {
                         $this->replace = $replace;

Modified: trunk/core/Form/Filters/StripTagsFilter.class.php
===================================================================
--- trunk/core/Form/Filters/StripTagsFilter.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Filters/StripTagsFilter.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -19,11 +19,17 @@
         {
                 private $exclude = null;
                 
+ /**
+ * @return StripTagsFilter
+ **/
                 public static function create()
                 {
                         return new self;
                 }
                 
+ /**
+ * @return StripTagsFilter
+ **/
                 public function setAllowableTags($exclude)
                 {
                         if (null !== $exclude)

Modified: trunk/core/Form/Form.class.php
===================================================================
--- trunk/core/Form/Form.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Form.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -25,6 +25,9 @@
                 private $errors = array();
                 private $labels = array();
                 
+ /**
+ * @return Form
+ **/
                 public static function create()
                 {
                         return new self;
@@ -35,6 +38,9 @@
                         return $this->errors + $this->violated;
                 }
 
+ /**
+ * @return Form
+ **/
                 public function dropAllErrors()
                 {
                         $this->errors = array();
@@ -47,12 +53,19 @@
                  * primitive marking
                 **/
                 
+ /**
+ * @return Form
+ **/
                 public function markMissing($primitiveName)
                 {
                         return $this->markCustom($primitiveName, Form::MISSING);
                 }
                 
- // rule or primitive
+ /**
+ * rule or primitive
+ *
+ * @return Form
+ **/
                 public function markWrong($name)
                 {
                         if (
@@ -64,6 +77,9 @@
                         return $this;
                 }
 
+ /**
+ * @return Form
+ **/
                 public function markGood($primitiveName)
                 {
                         $prm = $this->get($primitiveName);
@@ -75,6 +91,8 @@
 
                 /**
                  * Set's custom error mark for primitive.
+ *
+ * @return Form
                 **/
                 public function markCustom($primitiveName, $customMark)
                 {
@@ -120,21 +138,33 @@
                                 return null;
                 }
                 
+ /**
+ * @return Form
+ **/
                 public function addWrongLabel($primitiveName, $label)
                 {
                         return $this->addErrorLabel($primitiveName, Form::WRONG, $label);
                 }
                 
+ /**
+ * @return Form
+ **/
                 public function addMissingLabel($primitiveName, $label)
                 {
                         return $this->addErrorLabel($primitiveName, Form::MISSING, $label);
                 }
 
+ /**
+ * @return Form
+ **/
                 public function addCustomLabel($primitiveName, $customMark, $label)
                 {
                         return $this->addErrorLabel($primitiveName, $customMark, $label);
                 }
                 
+ /**
+ * @return Form
+ **/
                 public function import($scope)
                 {
                         foreach ($this->primitives as $prm)
@@ -143,6 +173,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return Form
+ **/
                 public function importMore($scope)
                 {
                         foreach ($this->primitives as $prm) {
@@ -156,11 +189,17 @@
                         return $this;
                 }
                 
+ /**
+ * @return Form
+ **/
                 public function importOne($primitiveName, $scope)
                 {
                         return $this->importPrimitive($scope, $this->get($primitiveName));
                 }
                 
+ /**
+ * @return Form
+ **/
                 public function importValue($primitiveName, $value)
                 {
                         $prm = $this->get($primitiveName);
@@ -168,6 +207,9 @@
                         return $this->checkImportResult($prm, $prm->importValue($value));
                 }
                 
+ /**
+ * @return Form
+ **/
                 public function importOneMore($primitiveName, $scope)
                 {
                         $prm = $this->get($primitiveName);
@@ -191,11 +233,17 @@
                                 return $value;
                 }
                 
+ /**
+ * @return Form
+ **/
                 private function importPrimitive($scope, BasePrimitive $prm)
                 {
                         return $this->checkImportResult($prm, $prm->import($scope));
                 }
                 
+ /**
+ * @return Form
+ **/
                 private function checkImportResult(BasePrimitive $prm, $result)
                 {
                         $name = $prm->getName();
@@ -218,7 +266,7 @@
                  * @param $name string primitive or rule name
                  * @param $errorType enum Form::(WRONG|MISSING)
                  * @param $label string YDFB WTF is this :-) (c) /.
- * @return $this Form itself
+ * @return Form
                 **/
                 private function addErrorLabel($name, $errorType, $label)
                 {

Modified: trunk/core/Form/FormField.class.php
===================================================================
--- trunk/core/Form/FormField.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/FormField.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -1,13 +1,13 @@
 <?php
-/***************************************************************************
- * Copyright (C) 2005 by Anton E. Lebedevich, Konstantin V. Arkhipov *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+/****************************************************************************
+ * Copyright (C) 2005-2006 by Anton E. Lebedevich, Konstantin V. Arkhipov *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ****************************************************************************/
 /* $Id$ */
 
         /**
@@ -26,9 +26,12 @@
                         $this->primitiveName = $name;
                 }
                 
+ /**
+ * @return FormField
+ **/
                 public static function create($name)
                 {
- return new FormField($name);
+ return new self($name);
                 }
 
                 public function getName()

Modified: trunk/core/Form/MappedForm.class.php
===================================================================
--- trunk/core/Form/MappedForm.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/MappedForm.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -20,6 +20,9 @@
                 
                 private $map = array();
                 
+ /**
+ * @return MappedForm
+ **/
                 public static function create(Form $form)
                 {
                         return new self($form);
@@ -29,12 +32,18 @@
                 {
                         $this->form = $form;
                 }
+ /**
+ * @return Form
+ **/
                 
                 public function getForm()
                 {
                         return $this->form;
                 }
                 
+ /**
+ * @return MappedForm
+ **/
                 public function setDefaultType(RequestType $type)
                 {
                         $this->type = $type;
@@ -42,6 +51,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return MappedForm
+ **/
                 public function addSource($primitiveName, RequestType $type)
                 {
                         $this->checkExistence($primitiveName);

Modified: trunk/core/Form/PlainForm.class.php
===================================================================
--- trunk/core/Form/PlainForm.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/PlainForm.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -20,6 +20,10 @@
                 protected $aliases = array();
                 protected $primitives = array();
                 
+ /**
+ * @throws MissingElementException
+ * @return PlainForm
+ **/
                 public function addAlias($primitiveName, $alias)
                 {
                         if (!isset($this->primitives[$primitiveName]))
@@ -41,14 +45,18 @@
                                 );
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PlainForm
+ **/
                 public function add(BasePrimitive $prm, $alias = null)
                 {
                         $name = $prm->getName();
                         
- if (isset($this->primitives[$name]))
- throw new WrongArgumentException(
+ Assert::isTrue(
+ isset($this->primitives[$name]),
                                         "i'm already exists!"
- );
+ );
 
                         $this->primitives[$name] = $prm;
                         
@@ -58,6 +66,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws MissingElementException
+ * @return PlainForm
+ **/
                 public function drop($name)
                 {
                         if (!isset($this->primitives[$name]))
@@ -70,6 +82,10 @@
                         return $this;
                 }
 
+ /**
+ * @throws MissingElementException
+ * @return BasePrimitive
+ **/
                 public function &get($name)
                 {
                         if (isset($this->aliases[$name], $this->primitives[$this->aliases[$name]]))

Modified: trunk/core/Form/Primitive.class.php
===================================================================
--- trunk/core/Form/Primitive.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitive.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -17,86 +17,137 @@
         **/
         final class Primitive extends StaticFactory
         {
+ /**
+ * @return BasePrimitive
+ **/
                 public static function spawn($primitive, $name)
                 {
                         return new $primitive($name);
                 }
                 
+ /**
+ * @return PrimitiveInteger
+ **/
                 public static function integer($name)
                 {
                         return new PrimitiveInteger($name);
                 }
                 
+ /**
+ * @return PrimitiveFloat
+ **/
                 public static function float($name)
                 {
                         return new PrimitiveFloat($name);
                 }
 
+ /**
+ * @return PrimitiveIdentifier
+ **/
                 public static function identifier($name)
                 {
                         return new PrimitiveIdentifier($name);
                 }
 
+ /**
+ * @return PrimitiveEnumeration
+ **/
                 public static function enumeration($name)
                 {
                         return new PrimitiveEnumeration($name);
                 }
                 
+ /**
+ * @return PrimitiveDate
+ **/
                 public static function date($name)
                 {
                         return new PrimitiveDate($name);
                 }
                 
+ /**
+ * @return PrimitiveTime
+ **/
                 public static function time($name)
                 {
                         return new PrimitiveTime($name);
                 }
                 
+ /**
+ * @return PrimitiveString
+ **/
                 public static function string($name)
                 {
                         return new PrimitiveString($name);
                 }
                 
+ /**
+ * @return PrimitiveRange
+ **/
                 public static function range($name)
                 {
                         return new PrimitiveRange($name);
                 }
                 
+ /**
+ * @return PrimitiveList
+ **/
                 public static function choice($name)
                 {
                         return new PrimitiveList($name);
                 }
                 
+ /**
+ * @return PrimitiveArray
+ **/
                 public static function set($name)
                 {
                         return new PrimitiveArray($name);
                 }
 
+ /**
+ * @return PrimitiveMultiList
+ **/
                 public static function multiChoice($name)
                 {
                         return new PrimitiveMultiList($name);
                 }
                 
+ /**
+ * @return PrimitiveBoolean
+ **/
                 public static function boolean($name)
                 {
                         return new PrimitiveBoolean($name);
                 }
                 
+ /**
+ * @return PrimitiveTernary
+ **/
                 public static function ternary($name)
                 {
                         return new PrimitiveTernary($name);
                 }
                 
+ /**
+ * @return PrimitiveFile
+ **/
                 public static function file($name)
                 {
                         return new PrimitiveFile($name);
                 }
                 
+ /**
+ * @return PrimitiveImage
+ **/
                 public static function image($name)
                 {
                         return new PrimitiveImage($name);
                 }
                 
+ /**
+ * @return ExplodedPrimitive
+ **/
                 public static function exploded($name)
                 {
                         return new ExplodedPrimitive($name);

Modified: trunk/core/Form/Primitives/BasePrimitive.class.php
===================================================================
--- trunk/core/Form/Primitives/BasePrimitive.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/BasePrimitive.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -35,6 +35,9 @@
                         return $this->name;
                 }
                 
+ /**
+ * @return BasePrimitive
+ **/
                 public function setName($name)
                 {
                         $this->name = $name;
@@ -47,6 +50,9 @@
                         return $this->default;
                 }
                 
+ /**
+ * @return BasePrimitive
+ **/
                 public function setDefault($default)
                 {
                         $this->default = $default;
@@ -74,6 +80,9 @@
                         return $this->default;
                 }
                 
+ /**
+ * @return BasePrimitive
+ **/
                 public function setValue($value)
                 {
                         $this->value = $value;
@@ -81,6 +90,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return BasePrimitive
+ **/
                 public function setRawValue($raw)
                 {
                         $this->raw = $raw;
@@ -93,6 +105,9 @@
                         return $this->required;
                 }
                 
+ /**
+ * @return BasePrimitive
+ **/
                 public function setRequired($really = false)
                 {
                         $this->required = (true === $really ? true : false);
@@ -100,6 +115,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return BasePrimitive
+ **/
                 public function required()
                 {
                         $this->required = true;
@@ -107,6 +125,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return BasePrimitive
+ **/
                 public function optional()
                 {
                         $this->required = false;

Modified: trunk/core/Form/Primitives/ComplexPrimitive.class.php
===================================================================
--- trunk/core/Form/Primitives/ComplexPrimitive.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/ComplexPrimitive.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -25,11 +25,17 @@
                         parent::__construct($name);
                 }
 
+ /**
+ * @return Ternary
+ **/
                 public function getState()
                 {
                         return $this->single;
                 }
 
+ /**
+ * @return ComplexPrimitive
+ **/
                 public function setState(Ternary $ternary)
                 {
                         $this->single->setValue($ternary->getValue());
@@ -37,6 +43,9 @@
                         return $this;
                 }
 
+ /**
+ * @return ComplexPrimitive
+ **/
                 public function setSingle()
                 {
                         $this->single->setTrue();
@@ -44,6 +53,9 @@
                         return $this;
                 }
 
+ /**
+ * @return ComplexPrimitive
+ **/
                 public function setComplex()
                 {
                         $this->single->setFalse();
@@ -51,6 +63,9 @@
                         return $this;
                 }
 
+ /**
+ * @return ComplexPrimitive
+ **/
                 public function setAnyState()
                 {
                         $this->single->setNull();

Modified: trunk/core/Form/Primitives/DateRangeList.class.php
===================================================================
--- trunk/core/Form/Primitives/DateRangeList.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/DateRangeList.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -92,6 +92,10 @@
                         return $rangeString;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return DateRange
+ **/
                 public static function makeRange($string)
                 {
                         if (
@@ -132,6 +136,10 @@
                         );
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return Timestamp
+ **/
                 private static function toDate($date)
                 {
                         if (strpos($date, '.') !== false) {

Modified: trunk/core/Form/Primitives/ExplodedPrimitive.class.php
===================================================================
--- trunk/core/Form/Primitives/ExplodedPrimitive.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/ExplodedPrimitive.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -17,6 +17,9 @@
         {
                 protected $separator = ' ';
                 
+ /**
+ * @return ExplodedPrimitive
+ **/
                 public function setSeparator($separator)
                 {
                         $this->separator = $separator;

Modified: trunk/core/Form/Primitives/FiltrablePrimitive.class.php
===================================================================
--- trunk/core/Form/Primitives/FiltrablePrimitive.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/FiltrablePrimitive.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -28,6 +28,9 @@
                         $this->importFilter = new FilterChain();
                 }
 
+ /**
+ * @return FiltrablePrimitive
+ **/
                 public function addDisplayFilter(Filtrator $filter)
                 {
                         $this->displayFilter->add($filter);
@@ -35,6 +38,9 @@
                         return $this;
                 }
 
+ /**
+ * @return FiltrablePrimitive
+ **/
                 public function dropDisplayFilters()
                 {
                         $this->displayFilter->dropAll();
@@ -47,6 +53,9 @@
                         return $this->displayFilter->apply($this->getActualValue());
                 }
 
+ /**
+ * @return FiltrablePrimitive
+ **/
                 public function addImportFilter(Filtrator $filter)
                 {
                         $this->importFilter->add($filter);
@@ -54,6 +63,9 @@
                         return $this;
                 }
 
+ /**
+ * @return FiltrablePrimitive
+ **/
                 public function dropImportFilters()
                 {
                         $this->importFilter->dropAll();
@@ -61,11 +73,25 @@
                         return $this;
                 }
                 
+ /**
+ * @return FilterChain
+ **/
                 public function getImportFilter()
                 {
                         return $this->importFilter;
                 }
 
+ /**
+ * @return FilterChain
+ **/
+ public function getDisplayFilter()
+ {
+ return $this->displayFilter;
+ }
+
+ /**
+ * @return FiltrablePrimitive
+ **/
                 protected function selfFilter()
                 {
                         $this->value = $this->importFilter->apply($this->value);

Modified: trunk/core/Form/Primitives/IdentifiablePrimitive.class.php
===================================================================
--- trunk/core/Form/Primitives/IdentifiablePrimitive.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/IdentifiablePrimitive.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -19,6 +19,10 @@
                 
                 abstract public function of($className);
                 
+ /**
+ * @throws WrongArgumentException
+ * @return IdentifiablePrimitive
+ **/
                 public function setValue($value)
                 {
                         $className = $this->className;

Modified: trunk/core/Form/Primitives/PrimitiveDate.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveDate.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveDate.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -23,7 +23,10 @@
                 const MINUTES = 'min';
                 const SECONDS = 'sec';
                 
- // typeHinting commented out due to stupid E_STRICT
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveDate
+ **/
                 public function setValue(/* Timestamp */ $stamp)
                 {
                         Assert::isTrue($stamp instanceof Timestamp);
@@ -33,6 +36,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveDate
+ **/
                 public function setMin(/* Timestamp */ $stamp)
                 {
                         Assert::isTrue($stamp instanceof Timestamp);
@@ -42,6 +49,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveDate
+ **/
                 public function setMax(/* Timestamp */ $stamp)
                 {
                         Assert::isTrue($stamp instanceof Timestamp);
@@ -51,6 +62,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveDate
+ **/
                 public function setDefault(/* Timestamp */ $stamp)
                 {
                         Assert::isTrue($stamp instanceof Timestamp);

Modified: trunk/core/Form/Primitives/PrimitiveEnumeration.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveEnumeration.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveEnumeration.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -32,6 +32,10 @@
                         /* NOTREACHED */
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveEnumeration
+ **/
                 public function of($className)
                 {
                         Assert::isTrue(

Modified: trunk/core/Form/Primitives/PrimitiveFile.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveFile.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveFile.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -32,6 +32,10 @@
                         return $this->mimeType;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveFile
+ **/
                 public function setAllowedMimeTypes($mimes)
                 {
                         Assert::isArray($mimes);
@@ -41,6 +45,10 @@
                         return $this;
                 }
 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveFile
+ **/
                 public function addAllowedMimeType($mime)
                 {
                         Assert::isString($mime);

Modified: trunk/core/Form/Primitives/PrimitiveIdentifier.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveIdentifier.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveIdentifier.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -15,6 +15,10 @@
         **/
         final class PrimitiveIdentifier extends IdentifiablePrimitive
         {
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveIdentifier
+ **/
                 public function of($className)
                 {
                         Assert::isTrue(

Modified: trunk/core/Form/Primitives/PrimitiveImage.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveImage.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveImage.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -43,6 +43,9 @@
                         return $this->type;
                 }
 
+ /**
+ * @return PrimitiveImage
+ **/
                 public function setMaxWidth($max)
                 {
                         $this->maxWidth = $max;
@@ -50,6 +53,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return PrimitiveImage
+ **/
                 public function setMinWidth($min)
                 {
                         $this->minWidth = $min;
@@ -57,6 +63,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return PrimitiveImage
+ **/
                 public function setMaxHeight($max)
                 {
                         $this->maxHeight = $max;
@@ -64,6 +73,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return PrimitiveImage
+ **/
                 public function setMinHeight($min)
                 {
                         $this->minHeight = $min;

Modified: trunk/core/Form/Primitives/PrimitiveList.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveList.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveList.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -22,6 +22,9 @@
                         return $this->list;
                 }
                 
+ /**
+ * @return PrimitiveImage
+ **/
                 public function setList($list)
                 {
                         $this->list = $list;

Modified: trunk/core/Form/Primitives/PrimitiveRange.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveRange.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveRange.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -18,7 +18,10 @@
                 const MIN = 'min';
                 const MAX = 'max';
 
- // to be E_STRICT compatible
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveRange
+ **/
                 public function setValue(/* Range */ $range)
                 {
                         Assert::isTrue(

Modified: trunk/core/Form/Primitives/PrimitiveString.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveString.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveString.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -17,7 +17,11 @@
         {
                 private $pattern = null;
                 
- // mail hint: /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/
+ /**
+ * mail hint: /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/
+ *
+ * @return PrimitiveString
+ **/
                 public function setAllowedPattern($pattern)
                 {
                         $this->pattern = $pattern;

Modified: trunk/core/Form/Primitives/PrimitiveTernary.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveTernary.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveTernary.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -18,6 +18,9 @@
                 private $falseValue = 0;
                 private $trueValue = 1;
                 
+ /**
+ * @return PrimitiveTernary
+ **/
                 public function setTrueValue($trueValue)
                 {
                         $this->trueValue = $trueValue;
@@ -25,6 +28,9 @@
                         return $this;
                 }
                 
+ /**
+ * @return PrimitiveTernary
+ **/
                 public function setFalseValue($falseValue)
                 {
                         $this->falseValue = $falseValue;

Modified: trunk/core/Form/Primitives/PrimitiveTime.class.php
===================================================================
--- trunk/core/Form/Primitives/PrimitiveTime.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/PrimitiveTime.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -19,6 +19,10 @@
                 const MINUTES = PrimitiveDate::MINUTES;
                 const SECONDS = PrimitiveDate::SECONDS;
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveTime
+ **/
                 public function setValue(/* Time */ $time)
                 {
                         Assert::isTrue($time instanceof Time);
@@ -28,6 +32,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveTime
+ **/
                 public function setMin(/* Time */ $time)
                 {
                         Assert::isTrue($time instanceof Time);
@@ -37,6 +45,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveTime
+ **/
                 public function setMax(/* Time */ $time)
                 {
                         Assert::isTrue($time instanceof Time);
@@ -46,6 +58,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws WrongArgumentException
+ * @return PrimitiveTime
+ **/
                 public function setDefault(/* Time */ $time)
                 {
                         Assert::isTrue($time instanceof Time);

Modified: trunk/core/Form/Primitives/RangedPrimitive.class.php
===================================================================
--- trunk/core/Form/Primitives/RangedPrimitive.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/Primitives/RangedPrimitive.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -23,6 +23,9 @@
                         return $this->min;
                 }
                 
+ /**
+ * @return RangedPrimitive
+ **/
                 public function setMin($min)
                 {
                         $this->min = $min;
@@ -35,6 +38,9 @@
                         return $this->max;
                 }
                 
+ /**
+ * @return RangedPrimitive
+ **/
                 public function setMax($max)
                 {
                         $this->max = $max;

Modified: trunk/core/Form/RegulatedForm.class.php
===================================================================
--- trunk/core/Form/RegulatedForm.class.php 2006-11-09 11:20:15 UTC (rev 2187)
+++ trunk/core/Form/RegulatedForm.class.php 2006-11-09 11:40:28 UTC (rev 2188)
@@ -20,6 +20,10 @@
                 protected $rules = array(); // forever
                 protected $violated = array(); // rules
 
+ /**
+ * @throws WrongArgumentException
+ * @return RegulatedForm
+ **/
                 public function addRule($name, LogicalObject $rule)
                 {
                         Assert::isString($name);
@@ -29,6 +33,10 @@
                         return $this;
                 }
                 
+ /**
+ * @throws MissingElementException
+ * @return RegulatedForm
+ **/
                 public function dropRuleByName($name)
                 {
                         if (isset($this->rules[$name])) {
@@ -41,6 +49,9 @@
                         );
                 }
                 
+ /**
+ * @return RegulatedForm
+ **/
                 public function checkRules()
                 {
                         foreach ($this->rules as $name => &$logicalObject) {
Received on Thu Nov 09 2006 - 14:40:28 MSK

This archive was generated by hypermail 2.2.0 : Sat Oct 27 2007 - 20:42:37 MSD