Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
ErrorCodeVALUE.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 namespace {
7  /**
8  * Error codes used to checking family attribute structure
9  * @class ErrorCodeVALUE
10  * @see ErrorCode
11  * @see Doc::setAttributeValue()
12  * @brief List all error code used when use setAttrbuteValue
13  */
15  {
16  /**
17  * @errorCode value cannot be used to modify document attribute - detected in internal Doc::setValue
18  */
19  const VALUE0001 = 'attribute "%s", (family "%s", document "%s") : set internal value error : "%s"';
20  /**
21  * @errorCode for multiple attribute only array values can be set
22  */
23  const VALUE0002 = 'value "%s" must be an array to set attribute "%s", (family "%s", document "%s")';
24  /**
25  * @errorCode for multiple attribute which are in array only array values can be set : combine option "multiple=yes" and in array
26  */
27  const VALUE0003 = 'each values of a multiple in array "%s" must be an array to set attribute "%s", (family "%s", document "%s")';
28  /**
29  * @errorCode the attribute is not a part of document
30  * @see Doc::setAttributeValue
31  */
32  const VALUE0004 = 'attribute "%s" is not defined for document "%s" (family "%s") : update aborted';
33 
34  /**
35  * @errorCode a int attribute must containt int value
36  * @see Doc::setAttributeValue
37  */
38  const VALUE0005 = 'attribute "%s", (family "%s", document "%s") : set value error : "%s"';
39 
40  /**
41  * @errorCode a non multiple attribute cannot has an array value
42  * @see Doc::setAttributeValue
43  */
44  const VALUE0006 = 'attribute "%s", (family "%s", document "%s") : cannot set single attribute with an array "%s"';
45 
46  /**
47  * @errorCode error during set a complete array
48  * @see Doc::setAttributeValue
49  */
50  const VALUE0007 = 'attribute "%s", (family "%s", document "%s") : cannot update array "%s"';
51 
52  /**
53  * @errorCode only array values must be used to set a complete array
54  * @see Doc::setAttributeValue
55  */
56  const VALUE0008 = 'attribute "%s", (family "%s", document "%s") : array value is requires to set array attribute "%s"';
57 
58  /**
59  * @errorCode error during set a complete array. Each row must be an array
60  * @see Doc::setAttributeValue
61  */
62  const VALUE0009 = 'attribute "%s", (family "%s", document "%s") : a row is not an array. Cannot update array "%s"';
63 
64 
65  /**
66  * @errorCode a int attribute must containt int value
67  * @see Doc::setAttributeValue
68  */
69  const VALUE0200 = 'a int attribute value must be a int type or a string. Found "%s" (%s).';
70 
71  /**
72  * @errorCode a double attribute must containt double or int value
73  * @see Doc::setAttributeValue
74  */
75  const VALUE0201 = 'a double attribute value must be a double or int type or a string. Found "%s" (%s).';
76 
77  /**
78  * @errorCode only scalar type can be used for
79  * @see Doc::setAttributeValue
80  */
81  const VALUE0202 = 'a attribute value must not be an object. Found "%s" (%s).';
82 
83 
84  /**
85  * @errorCode the attribute be an array
86  * @see Doc::getAttributeValue
87  */
88  const VALUE0100 = 'attribute "%s" is not an array in document "%s" (family "%s") : cannot use array value';
89 
90  /**
91  * @errorCode the attribute is not a part of document
92  * @see Doc::getAttributeValue
93  */
94  const VALUE0101 = 'attribute "%s" is not defined for document "%s" (family "%s")';
95  }
96 }
97 namespace Dcp\AttributeValue {
98  class Exception extends \Dcp\Exception
99  {
100  public $originalError="";
101  public $attributeId="";
102  public $index=-1;
103  }
104 }
List all error code used when use setAttrbuteValue.
Exception class use exceptionCode to identifiy correctly exception.
Definition: exceptions.php:19
← centre documentaire © anakeen