The final commit personal address books branches before merging

This commit is contained in:
RainLoop Team 2013-12-07 01:50:19 +04:00
parent 43f094220c
commit 867dcc8f7e
44 changed files with 2163 additions and 1147 deletions

View file

@ -5,24 +5,29 @@ namespace RainLoop\Providers\PersonalAddressBook\Classes;
class Contact
{
/**
* @var int
* @var string
*/
public $IdContact;
/**
* @var string
*/
public $DisplayInList;
public $Display;
/**
* @var int
* @var string
*/
public $Type;
public $DisplayName;
/**
* @var string
*/
public $DisplayEmail;
/**
* @var bool
*/
public $CanBeChanged;
public $Auto;
/**
* @var int
@ -32,7 +37,7 @@ class Contact
/**
* @var array
*/
public $TagsIds;
public $Tags;
/**
* @var array
@ -46,13 +51,14 @@ class Contact
public function Clear()
{
$this->IdContact = 0;
$this->IdContact = '';
$this->IdUser = 0;
$this->DisplayInList = '';
$this->Type = \RainLoop\Providers\PersonalAddressBook\Enumerations\ContactType::DEFAULT_;
$this->CanBeChanged = false;
$this->Display = '';
$this->DisplayName = '';
$this->DisplayEmail = '';
$this->Auto = false;
$this->Changed = \time();
$this->TagsIds = array();
$this->Tags = array();
$this->Properties = array();
}
@ -79,8 +85,11 @@ class Contact
}
}
}
$this->DisplayInList = 0 < \strlen($sDisplayName) ? $sDisplayName : (!empty($sDisplayEmail) ? $sDisplayEmail : '');
$this->DisplayName = $sDisplayName;
$this->DisplayEmail = $sDisplayEmail;
$this->Display = 0 < \strlen($sDisplayName) ? $sDisplayName : (!empty($sDisplayEmail) ? $sDisplayEmail : '');
}
/**

View file

@ -88,8 +88,8 @@ class Property
if ($this->IsPhone())
{
$sPhone = $this->Value;
$sPhone = \preg_replace('^[+]+', '', $sPhone);
$sPhone = \preg_replace('[^\d]', '', $sPhone);
$sPhone = \preg_replace('/^[+]+/', '', $sPhone);
$sPhone = \preg_replace('/[^\d]/', '', $sPhone);
$this->ValueClear = $sPhone;
}
}