Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Method.TestDefault.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Ooo Layout test
8  *
9  * @author Anakeen
10  *
11  * @package Dcp\Pu
12  */
13 /**
14  */
15 /**
16  */
17 /**
18  * @begin-method-ignore
19  * this part will be deleted when construct document class until end-method-ignore
20  */
21 class _TST_FAMILYDEFAULT extends Doc
22 {
23  /**
24  * @end-method-ignore
25  */
26  public function isOne()
27  {
28  return 1;
29  }
30 
31  public function addAllPlusOne($ar1, $ar2, $val)
32  {
33  return $ar1 + $ar2 + $val + 1;
34  }
35 
36  public function oneMore($x)
37  {
38  return intval($x) + 1;
39  }
40 
41  public function itself($x)
42  {
43  return $x;
44  }
45 
46  public function simpleAdd()
47  {
48  $tx = func_get_args();
49 
50  return array_sum($tx);
51  }
52 
53  public function commaConcat()
54  {
55  $tx = func_get_args();
56 
57  return implode(',', $tx);
58  }
59 
60  public function searchOnFamily()
61  {
62  include_once ("FDL/Class.SearchDoc.php");
63  $s = new SearchDoc($this->dbaccess, "TST_DEFAULTFAMILY1");
64  $s->search();
65  return $s->count();
66  }
67 
68  public function completeMyArray()
69  {
70  $t[] = array(
71  "tst_text2" => "First",
72  "tst_number2" => 10,
73  "tst_docm2" => "9\n11"
74  );
75  $t[] = array(
76  "tst_text2" => "Second",
77  "tst_number2" => 20,
78  "tst_docm2" => "12\n13"
79  );
80  return $t;
81  }
82  public function completeWrongArray()
83  {
84  $t = "not an array is a string";
85  return $t;
86  }
87  public function completeWrongAttributeArray()
88  {
89  $t[] = array(
90  "tst_text2" => "First",
91  "tst_number2" => "pi",
92  "tst_docm2" => "9\n11"
93  );
94  $t[] = array(
95  "tst_text2" => "Seven",
96  "tst_number2" => 20,
97  "tst_docm2" => "12\n13"
98  );
99  return $t;
100  }
101  /**
102  * @begin-method-ignore
103  * this part will be deleted when construct document class until end-method-ignore
104  */
105 }
106 /**
107  * @end-method-ignore
108  */
109 ?>
if($famId) $s
addAllPlusOne($ar1, $ar2, $val)
← centre documentaire © anakeen