forked from intacctaaron/intacctws-php
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathapi_fieldDef.php
More file actions
38 lines (35 loc) · 1.19 KB
/
api_fieldDef.php
File metadata and controls
38 lines (35 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Created by JetBrains PhpStorm.
* User: aaron
* Date: 4/14/13
* Time: 1:21 PM
* To change this template use File | Settings | File Templates.
*/
class api_fieldDef {
public $Name;
public $GroupName;
public $dataName;
public $externalDataName;
public $isRequired;
public $isReadOnly;
public $maxLength;
public $DisplayLabel;
public $Description;
public $id;
public function __construct(simpleXmlElement $simpleXml) {
$this->Name = (string)$simpleXml->Name;
$this->GroupName = (string)$simpleXml->GroupName;
$this->dataName = (string)$simpleXml->dataName;
$this->externalDataName = (string)$simpleXml->externalDataName;
$this->isRequired = (strtolower((string)$simpleXml->isRequired) == 'true') ? true : false;
$this->isReadOnly = (strtolower((string)$simpleXml->isReadOnly) == 'true') ? true : false;
$this->maxLength = (int)$simpleXml->maxLength;
$this->DisplayLabel = (string)$simpleXml->DisplayLabel;
$this->Description = (string)$simpleXml->Description;
$this->id = (string)$simpleXml->id;
}
public function __toString() {
return $this->Name;
}
}