├── DdeboerSalesforceMapperBundle.php
├── Annotation
├── Field.php
├── Object.php
├── Relation.php
└── AnnotationReader.php
├── .travis.yml
├── Events.php
├── Tests
├── Mock
│ ├── QueryResultMock.php
│ ├── SaveResultMock.php
│ ├── ContactMock.php
│ ├── DescribeTaskResult.php
│ ├── DescribeAccountResult.php
│ ├── TaskMock.php
│ ├── AccountContactRoleMock.php
│ ├── DescribeAccountContactRoleResult.php
│ ├── DescribeContactResult.php
│ └── AccountMock.php
├── Response
│ └── MappedRecordIteratorTest.php
├── bootstrap.php
└── MapperTest.php
├── phpunit.xml.dist
├── Event
└── BeforeSaveEvent.php
├── Resources
├── config
│ ├── param_converter.xml
│ └── services.xml
└── doc
│ └── index.md
├── composer.json
├── UnitOfWork.php
├── DependencyInjection
├── Configuration.php
└── DdeboerSalesforceMapperExtension.php
├── README.md
├── Cache
└── FileCache.php
├── MappedBulkSaverInterface.php
├── Query.php
├── Model
├── RecordType.php
├── PricebookEntry.php
├── Product.php
├── EmailTemplate.php
├── AbstractModel.php
├── StaticResource.php
├── MailmergeTemplate.php
├── OpportunityContactRole.php
├── AccountContactRole.php
├── Attachment.php
├── Name.php
├── Campaign.php
├── CampaignMember.php
├── OpportunityLineItem.php
├── Lead.php
├── Task.php
├── Account.php
├── Opportunity.php
├── User.php
└── Contact.php
├── Request
└── ParamConverter
│ └── SalesforceParamConverter.php
├── Response
└── MappedRecordIterator.php
├── MappedBulkSaver.php
└── Query
└── Builder.php
/DdeboerSalesforceMapperBundle.php:
--------------------------------------------------------------------------------
1 | size = $size;
12 | $this->done = $done;
13 | $this->records = $records;
14 | }
15 | }
--------------------------------------------------------------------------------
/Tests/Mock/SaveResultMock.php:
--------------------------------------------------------------------------------
1 | id = $id;
12 | $this->success = $success;
13 | $this->errors = $errors;
14 | $this->param = $param;
15 | }
16 | }
--------------------------------------------------------------------------------
/Tests/Mock/ContactMock.php:
--------------------------------------------------------------------------------
1 | fields[] = new FieldId();
13 | $this->fields[] = new FieldSubject();
14 | }
15 | }
16 |
17 | class FieldSubject extends Field
18 | {
19 | protected $name = 'Subject';
20 | protected $createable = true;
21 | protected $updateable = true;
22 | }
--------------------------------------------------------------------------------
/phpunit.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ./Tests
7 |
8 |
9 |
10 |
11 |
12 | ./
13 |
14 | ./Resources
15 | ./Tests
16 | ./vendor
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Event/BeforeSaveEvent.php:
--------------------------------------------------------------------------------
1 | objects = $objects;
20 | }
21 |
22 | /**
23 | * Get objects that will be saved to Salesforce
24 | *
25 | * @return type
26 | */
27 | public function getObjects()
28 | {
29 | return $this->objects;
30 | }
31 | }
--------------------------------------------------------------------------------
/Tests/Mock/DescribeAccountResult.php:
--------------------------------------------------------------------------------
1 | fields[] = new FieldId();
13 | $this->fields[] = new FieldName();
14 | }
15 | }
16 |
17 | class FieldName extends Field
18 | {
19 | protected $name = 'Name';
20 | protected $createable = true;
21 | protected $updateable = true;
22 | }
23 |
24 | class FieldId extends Field
25 | {
26 | protected $name = 'Id';
27 | protected $createable = true;
28 | protected $updateable = true;
29 | }
--------------------------------------------------------------------------------
/Tests/Mock/TaskMock.php:
--------------------------------------------------------------------------------
1 | id;
27 | }
28 |
29 | public function getSubject()
30 | {
31 | return $this->subject;
32 | }
33 |
34 | public function setSubject($subject)
35 | {
36 | $this->subject = $subject;
37 | }
38 | }
--------------------------------------------------------------------------------
/Resources/config/param_converter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
10 |
11 |
12 | %ddeboer_salesforce_mapper.param_converter%
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Tests/Mock/AccountContactRoleMock.php:
--------------------------------------------------------------------------------
1 | getMockBuilder('\Phpforce\SoapClient\Result\RecordIterator')
13 | ->disableOriginalConstructor()
14 | ->getMock();
15 |
16 | $mapper = $this->getMockBuilder('\Ddeboer\Salesforce\MapperBundle\Mapper')
17 | ->disableOriginalConstructor()
18 | ->getMock();
19 |
20 | $iterator = new MappedRecordIterator($recordIterator, $mapper, 'Account');
21 |
22 | $this->assertNull($iterator->first());
23 | }
24 | }
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ddeboer/salesforce-mapper-bundle",
3 | "type": "symfony-bundle",
4 | "description": "A Salesforce API mapper",
5 | "keywords": [ "salesforce", "soap", "web service" ],
6 | "homepage": "https://github.com/Ddeboer/DdeboerSalesforceMapperBundle/",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "David de Boer",
11 | "email": "david@ddeboer.nl"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=5.3.2",
16 | "phpforce/salesforce-bundle": "dev-master",
17 | "doctrine/common": "*"
18 | },
19 | "suggest": {
20 | "sensio/framework-extra-bundle": "For the param converter"
21 | },
22 | "autoload": {
23 | "psr-0": { "Ddeboer\\Salesforce\\MapperBundle": "" }
24 | },
25 | "target-dir": "Ddeboer/Salesforce/MapperBundle",
26 | "minimum-stability": "dev"
27 | }
--------------------------------------------------------------------------------
/Tests/bootstrap.php:
--------------------------------------------------------------------------------
1 | fields[] = new FieldAccount();
13 | $this->fields[] = new FieldContact();
14 | }
15 | }
16 |
17 | class FieldAccount extends Field
18 | {
19 | protected $name = 'AccountId';
20 | protected $relationshipName = 'Account';
21 | protected $referenceTo = array('Account');
22 | protected $createable = true;
23 | protected $updateable = false;
24 | }
25 |
26 | class FieldContact extends Field
27 | {
28 | protected $name = 'ContactId';
29 | protected $relationshipName = 'Contact';
30 | protected $referenceTo = array('Contact');
31 | protected $createable = true;
32 | protected $updateable = true;
33 | }
--------------------------------------------------------------------------------
/Tests/Mock/DescribeContactResult.php:
--------------------------------------------------------------------------------
1 | fields[] = new FieldContactId();
13 | $this->fields[] = new FieldContactFirstName();
14 | $this->fields[] = new FieldContactLastName();
15 | }
16 | }
17 |
18 | class FieldContactId extends Field
19 | {
20 | protected $name = 'Id';
21 | protected $createable = true;
22 | protected $updateable = true;
23 | }
24 |
25 | class FieldContactFirstName extends Field
26 | {
27 | protected $name = 'FirstName';
28 | protected $createable = true;
29 | protected $updateable = true;
30 | }
31 |
32 | class FieldContactLastName extends Field
33 | {
34 | protected $name = 'LastName';
35 | protected $createable = true;
36 | protected $updateable = true;
37 | }
--------------------------------------------------------------------------------
/UnitOfWork.php:
--------------------------------------------------------------------------------
1 | mapper = $mapper;
15 | $this->annotationReader = $annotationReader;
16 | }
17 |
18 | public function find($modelClass, $id)
19 | {
20 | $sObjectName = $this->getObjectName($modelClass);
21 |
22 | if (isset($this->identityMap[$sObjectName][$id])) {
23 | return $this->identityMap[$sObjectName][$id];
24 | }
25 | }
26 |
27 | public function addToIdentityMap($model)
28 | {
29 | $this->getObjectName($model);
30 | $this->identityMap[$this->getObjectName($model)][$model->getId()] = $model;
31 | }
32 |
33 | protected function getObjectName($model)
34 | {
35 | $description = $this->mapper->getObjectDescription($model);
36 |
37 | return $description->getName();
38 | }
39 | }
--------------------------------------------------------------------------------
/DependencyInjection/Configuration.php:
--------------------------------------------------------------------------------
1 | root('ddeboer_salesforce_mapper');
22 | $rootNode
23 | ->children()
24 | ->scalarNode('cache_driver')->defaultValue('file')->end()
25 | ->arrayNode('param_converter')
26 | ->requiresAtLeastOneElement()
27 | ->useAttributeAsKey('name')
28 | ->prototype('scalar')->end()
29 | ->end()
30 | ->end();
31 |
32 | return $treeBuilder;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Tests/Mock/AccountMock.php:
--------------------------------------------------------------------------------
1 | id;
32 | }
33 |
34 | public function getName()
35 | {
36 | return $this->name;
37 | }
38 |
39 | public function setName($name)
40 | {
41 | $this->name = $name;
42 | }
43 |
44 | public function getAccountContactRoles()
45 | {
46 | return $this->accountContactRoles;
47 | }
48 |
49 | public function setAccountContactRoles($accountContactRoles)
50 | {
51 | $this->accountContactRoles = $accountContactRoles;
52 | }
53 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](http://travis-ci.org/ddeboer/DdeboerSalesforceMapperBundle)
2 |
3 | Ddeboer Salesforce Mapper Bundle
4 | ================================
5 |
6 | Introduction
7 | ------------
8 |
9 | This bundle provides transparent, object-oriented access to your Salesforce
10 | data.
11 |
12 | ### Features
13 |
14 | * Easily fetch records from Salesforce, and save these same records back to
15 | Salesforce: read-only fields are automatically ignored when saving.
16 | * Find by criteria, so you don’t have to roll your own SOQL queries.
17 | * Fetch related records in one go, so you save on
18 | [API calls](http://www.salesforce.com/us/developer/docs/api/Content/implementation_considerations.htm#topic-title_request_metering).
19 | * Adjust the mappings to retrieve and save records exactly like you want to.
20 | * The MappedBulkSaver helps you stay within your Salesforce API limits by using
21 | bulk creates, deletes, updates and upserts for mapped objects.
22 | * Completely unit tested (still working on that one).
23 |
24 | Documentation
25 | -------------
26 |
27 | Documentation is included in the [Resources/doc directory](http://github.com/ddeboer/DdeboerSalesforceMapperBundle/tree/master/Resources/doc/index.md).
--------------------------------------------------------------------------------
/Cache/FileCache.php:
--------------------------------------------------------------------------------
1 | dir = rtrim($dir, '\\/');
22 |
23 | }
24 |
25 | public function fetch($id)
26 | {
27 | if ($this->contains($id)) {
28 | return unserialize(file_get_contents($this->getFilenameFromId($id)));
29 | }
30 | }
31 |
32 | public function contains($id)
33 | {
34 | return is_readable($this->getFilenameFromId($id));
35 | }
36 |
37 | public function save($id, $data, $lifeTime = 0)
38 | {
39 | file_put_contents($this->getFilenameFromId($id), serialize($data));
40 | }
41 |
42 | public function delete($id)
43 | {
44 | if ($this->contains($id)) {
45 | unlink($this->getFilenameFromId($id));
46 | }
47 | }
48 |
49 | public function getStats()
50 | {
51 |
52 | }
53 |
54 | private function getFilenameFromId($id)
55 | {
56 | return $this->dir . '/' . md5($id);
57 | }
58 | }
--------------------------------------------------------------------------------
/MappedBulkSaverInterface.php:
--------------------------------------------------------------------------------
1 | mapper = $mapper;
16 | $this->client = $client;
17 | $this->query = $query;
18 | $this->drivingModel = $drivingModel;
19 | }
20 |
21 | /**
22 | * Get Salesforce Object Query Language (SOQL) from query
23 | *
24 | * @return string
25 | */
26 | public function getSOQL()
27 | {
28 | return $this->query;
29 | }
30 |
31 | /**
32 | * Get mapped result
33 | *
34 | * @return MappedRecordIterator
35 | */
36 | public function getResult()
37 | {
38 | echo $this->query;die;
39 | $records = $this->client->query($this->query);
40 | die;
41 | return new MappedRecordIterator($records, $this->mapper, $this->drivingModel);
42 | }
43 |
44 | /**
45 | * Get (unmapped) array result
46 | *
47 | * @return array
48 | */
49 | public function getArrayResult()
50 | {
51 |
52 | }
53 |
54 | public function getSingleResult()
55 | {
56 |
57 | }
58 |
59 | public function __toString()
60 | {
61 | return $this->query;
62 | }
63 | }
--------------------------------------------------------------------------------
/DependencyInjection/DdeboerSalesforceMapperExtension.php:
--------------------------------------------------------------------------------
1 | processConfiguration($configuration, $configs);
24 |
25 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26 | $loader->load('services.xml');
27 |
28 | if (isset($config['cache_driver'])) {
29 | switch ($config['cache_driver']) {
30 | case 'file':
31 | $container->setAlias('ddeboer_salesforce_mapper.cache', 'ddeboer_salesforce_mapper.file_cache');
32 | break;
33 | default:
34 | break;
35 | }
36 | }
37 |
38 | if (isset($config['param_converter'])) {
39 | $loader->load('param_converter.xml');
40 | $container->setParameter('ddeboer_salesforce_mapper.param_converter', $config['param_converter']);
41 | }
42 | }
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/Resources/config/services.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | %kernel.cache_dir%/salesforce
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Model/RecordType.php:
--------------------------------------------------------------------------------
1 | developerName;
41 | }
42 |
43 | public function setDeveloperName($developerName)
44 | {
45 | $this->developerName = $developerName;
46 | }
47 |
48 | public function isActive()
49 | {
50 | return $this->isActive;
51 | }
52 |
53 | public function setIsActive($isActive)
54 | {
55 | $this->isActive = $isActive;
56 | }
57 |
58 | public function getName()
59 | {
60 | return $this->name;
61 | }
62 |
63 | public function setName($name)
64 | {
65 | $this->name = $name;
66 | }
67 |
68 | public function getSObjectType()
69 | {
70 | return $this->sObjectType;
71 | }
72 |
73 | public function setSObjectType($sObjectType)
74 | {
75 | $this->sObjectType = $sObjectType;
76 | }
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/Model/PricebookEntry.php:
--------------------------------------------------------------------------------
1 | name;
46 | }
47 |
48 | public function setName($name)
49 | {
50 | $this->name = $name;
51 | }
52 |
53 | public function getIsActive()
54 | {
55 | return $this->isActive;
56 | }
57 |
58 | public function setIsActive($isActive)
59 | {
60 | $this->isActive = $isActive;
61 | }
62 |
63 | public function getProduct()
64 | {
65 | return $this->product;
66 | }
67 |
68 | public function setProduct($product)
69 | {
70 | $this->product = $product;
71 | }
72 | }
--------------------------------------------------------------------------------
/Model/Product.php:
--------------------------------------------------------------------------------
1 | name;
43 | }
44 |
45 | public function setName($name)
46 | {
47 | $this->name = $name;
48 | }
49 |
50 | public function getDescription()
51 | {
52 | return $this->description;
53 | }
54 |
55 | public function setDescription($description)
56 | {
57 | $this->description = $description;
58 | }
59 |
60 | public function getFamily()
61 | {
62 | return $this->family;
63 | }
64 |
65 | public function setFamily($family)
66 | {
67 | $this->family = $family;
68 | }
69 |
70 | public function getIsActive()
71 | {
72 | return $this->isActive;
73 | }
74 |
75 | public function isActive()
76 | {
77 | return $this->getIsActive();
78 | }
79 |
80 | public function setIsActive($isActive)
81 | {
82 | $this->isActive = $isActive;
83 | }
84 | }
--------------------------------------------------------------------------------
/Model/EmailTemplate.php:
--------------------------------------------------------------------------------
1 | body;
50 | }
51 |
52 | public function setBody($body)
53 | {
54 | $this->body = $body;
55 | }
56 |
57 | public function getName()
58 | {
59 | return $this->name;
60 | }
61 |
62 | public function setName($name)
63 | {
64 | $this->name = $name;
65 | }
66 |
67 | public function getSubject()
68 | {
69 | return $this->subject;
70 | }
71 |
72 | public function setSubject($subject)
73 | {
74 | $this->subject = $subject;
75 | }
76 |
77 | public function getHtmlValue()
78 | {
79 | return $this->htmlValue;
80 | }
81 |
82 | public function setHtmlValue($htmlValue)
83 | {
84 | $this->htmlValue = $htmlValue;
85 | }
86 |
87 | public function getDeveloperName()
88 | {
89 | return $this->developerName;
90 | }
91 |
92 | public function setDeveloperName($developerName)
93 | {
94 | $this->developerName = $developerName;
95 | }
96 | }
--------------------------------------------------------------------------------
/Request/ParamConverter/SalesforceParamConverter.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | class SalesforceParamConverter implements ParamConverterInterface
18 | {
19 | /**
20 | * @var Mapper
21 | */
22 | protected $mapper;
23 |
24 | /**
25 | * @var array
26 | *
27 | * Property name => Salesforce model name
28 | */
29 | protected $mappings;
30 |
31 | /**
32 | * {@inheritdoc}
33 | */
34 | public function __construct(Mapper $mapper, array $mappings)
35 | {
36 | $this->mapper = $mapper;
37 | $this->mappings = $mappings;
38 | }
39 |
40 | /**
41 | * {@inheritdoc}
42 | */
43 | public function apply(Request $request, ConfigurationInterface $configuration)
44 | {
45 | // @todo Is it smart to do this based on variable name? Perhaps it's
46 | // better to, here also, look at class name?
47 | $class = $configuration->getClass();
48 |
49 | // If request has property set that corresponds to the Salesforce model,
50 | // go ahead and do the param conversion.
51 | $propertyName = \array_search($class, $this->mappings);
52 | if ($request->attributes->has($propertyName)) {
53 | $id = $request->attributes->get($propertyName);
54 | $model = $this->mapper->find($class, $id);
55 | if (!$model) {
56 | throw new NotFoundHttpException('Model with id ' . $id . ' not found');
57 | }
58 |
59 | $request->attributes->set($configuration->getName(), $model);
60 | }
61 | }
62 |
63 | /**
64 | * {@inheritdoc}
65 | */
66 | public function supports(ConfigurationInterface $configuration)
67 | {
68 | return in_array($configuration->getClass(), $this->mappings);
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/Model/AbstractModel.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | abstract class AbstractModel
13 | {
14 | /**
15 | * Object ID
16 | *
17 | * @var string
18 | * @Salesforce\Field(name="Id")
19 | */
20 | protected $id;
21 |
22 | /**
23 | * @var User
24 | */
25 | protected $createdBy;
26 |
27 | /**
28 | * @var string
29 | */
30 | protected $createdById;
31 |
32 | /**
33 | * @var \DateTime
34 | * @Salesforce\Field(name="CreatedDate")
35 | */
36 | protected $createdDate;
37 |
38 | /**
39 | * @var strng
40 | * @Salesforce\Field(name="LastModifiedById")
41 | */
42 | protected $lastModifiedById;
43 |
44 | /**
45 | * @var \DateTime
46 | * @Salesforce\Field(name="LastModifiedDate")
47 | */
48 | protected $lastModifiedDate;
49 |
50 | /**
51 | * @var \DateTime
52 | * @Salesforce\Field(name="SystemModstamp")
53 | */
54 | protected $systemModstamp;
55 |
56 | /**
57 | * @return string
58 | */
59 | public function getId()
60 | {
61 | return $this->id;
62 | }
63 |
64 | /**
65 | * @return User
66 | */
67 | public function getCreatedBy()
68 | {
69 | return $this->createdBy;
70 | }
71 |
72 | /**
73 | * @return string
74 | */
75 | public function getCreatedById()
76 | {
77 | return $this->createdById;
78 | }
79 |
80 | /**
81 | * @return \DateTime
82 | */
83 | public function getCreatedDate()
84 | {
85 | return $this->createdDate;
86 | }
87 |
88 | /**
89 | * @return string
90 | */
91 | public function getLastModifiedById()
92 | {
93 | return $this->lastModifiedById;
94 | }
95 |
96 | /**
97 | * @return \DateTime
98 | */
99 | public function getLastModifiedDate()
100 | {
101 | return $this->lastModifiedDate;
102 | }
103 |
104 | /**
105 | * @return \DateTime
106 | */
107 | public function getSystemModstamp()
108 | {
109 | return $this->systemModstamp;
110 | }
111 | }
--------------------------------------------------------------------------------
/Model/StaticResource.php:
--------------------------------------------------------------------------------
1 | contentType;
62 | }
63 |
64 | public function getBody()
65 | {
66 | return $this->body;
67 | }
68 |
69 | public function setBody($body)
70 | {
71 | $this->body = $body;
72 | }
73 |
74 | public function getBodyLength()
75 | {
76 | return $this->bodyLength;
77 | }
78 |
79 | public function setBodyLength($bodyLength)
80 | {
81 | $this->bodyLength = $bodyLength;
82 | }
83 |
84 | public function getCacheControl()
85 | {
86 | return $this->cacheControl;
87 | }
88 |
89 | public function setCacheControl($cacheControl)
90 | {
91 | $this->cacheControl = $cacheControl;
92 | }
93 |
94 | public function getDescription()
95 | {
96 | return $this->description;
97 | }
98 |
99 | public function setDescription($description)
100 | {
101 | $this->description = $description;
102 | }
103 |
104 | public function getName()
105 | {
106 | return $this->name;
107 | }
108 |
109 | public function setName($name)
110 | {
111 | $this->name = $name;
112 | }
113 |
114 | public function getNamespacePrefix()
115 | {
116 | return $this->namespacePrefix;
117 | }
118 |
119 | public function setNamespacePrefix($namespacePrefix)
120 | {
121 | $this->namespacePrefix = $namespacePrefix;
122 | }
123 | }
--------------------------------------------------------------------------------
/Model/MailmergeTemplate.php:
--------------------------------------------------------------------------------
1 | bodyLength;
68 | }
69 |
70 | public function getBody()
71 | {
72 | return $this->body;
73 | }
74 |
75 | public function setBody($body)
76 | {
77 | $this->body = $body;
78 | }
79 |
80 | public function getCategory()
81 | {
82 | return $this->category;
83 | }
84 |
85 | public function setCategory($category)
86 | {
87 | $this->category = $category;
88 | }
89 |
90 | public function getDescription()
91 | {
92 | return $this->description;
93 | }
94 |
95 | public function setDescription($description)
96 | {
97 | $this->description = $description;
98 | }
99 |
100 | public function getFilename()
101 | {
102 | return $this->filename;
103 | }
104 |
105 | public function setFilename($filename)
106 | {
107 | $this->filename = $filename;
108 | }
109 |
110 | public function getIsDeleted()
111 | {
112 | return $this->isDeleted;
113 | }
114 |
115 | public function setIsDeleted($isDeleted)
116 | {
117 | $this->isDeleted = $isDeleted;
118 | }
119 |
120 | public function getLastUsedDate()
121 | {
122 | return $this->lastUsedDate;
123 | }
124 |
125 | public function setLastUsedDate($lastUsedDate)
126 | {
127 | $this->lastUsedDate = $lastUsedDate;
128 | }
129 |
130 | public function getName()
131 | {
132 | return $this->name;
133 | }
134 |
135 | public function setName($name)
136 | {
137 | $this->name = $name;
138 | }
139 | }
--------------------------------------------------------------------------------
/Model/OpportunityContactRole.php:
--------------------------------------------------------------------------------
1 | contact;
61 | }
62 |
63 | public function setContact(Contact $contact)
64 | {
65 | $this->contact = $contact;
66 | return $this;
67 | }
68 |
69 | public function getContactId()
70 | {
71 | return $this->contactId;
72 | }
73 |
74 | public function setContactId($contactId)
75 | {
76 | $this->contactId = $contactId;
77 | return $this;
78 | }
79 |
80 | public function isDeleted()
81 | {
82 | return $this->isDeleted;
83 | }
84 |
85 | public function isPrimary()
86 | {
87 | return $this->isPrimary;
88 | }
89 |
90 | public function setIsPrimary($isPrimary)
91 | {
92 | $this->isPrimary = $isPrimary;
93 | return $this;
94 | }
95 |
96 | public function getOpportunity()
97 | {
98 | return $this->opportunity;
99 | }
100 |
101 | public function setOpportunity($opportunity)
102 | {
103 | $this->opportunity = $opportunity;
104 | $this->opportunityId = $opportunity->getId();
105 | return $this;
106 | }
107 |
108 | public function getOpportunityId()
109 | {
110 | return $this->opportunityId;
111 | }
112 |
113 | public function setOpportunityId($opportunityId)
114 | {
115 | $this->opportunityId = $opportunityId;
116 | return $this;
117 | }
118 |
119 | public function getRole()
120 | {
121 | return $this->role;
122 | }
123 |
124 | public function setRole($role)
125 | {
126 | $this->role = $role;
127 | return $this;
128 | }
129 | }
--------------------------------------------------------------------------------
/Response/MappedRecordIterator.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 | class MappedRecordIterator implements \OuterIterator, \Countable
15 | {
16 | /**
17 | * Record iterator
18 | *
19 | * @var RecordIterator
20 | */
21 | protected $recordIterator;
22 |
23 | /**
24 | * Mapper
25 | *
26 | * @var Mapper
27 | */
28 | protected $mapper;
29 |
30 | /**
31 | * Domain model object
32 | *
33 | * @var mixed
34 | */
35 | protected $modelClass;
36 |
37 | /**
38 | * Construct a mapped record iterator
39 | *
40 | * @param RecordIterator $recordIterator
41 | * @param Mapper Salesforce mapper
42 | * @param mixed $modelClass Model class name
43 | */
44 | public function __construct(RecordIterator $recordIterator, Mapper $mapper, $modelClass)
45 | {
46 | $this->recordIterator = $recordIterator;
47 | $this->mapper = $mapper;
48 | $this->modelClass = $modelClass;
49 | }
50 |
51 | /**
52 | * {@inheritdoc}
53 | *
54 | * @return RecordIterator
55 | */
56 | public function getInnerIterator()
57 | {
58 | return $this->recordIterator;
59 | }
60 |
61 | /**
62 | * Get domain model object
63 | *
64 | * @return mixed The domain model object containing the values from the
65 | * Salesforce record
66 | *
67 | */
68 | public function current()
69 | {
70 | return $this->get($this->key());
71 | }
72 |
73 | /**
74 | * {@inheritdoc}
75 | */
76 | public function next()
77 | {
78 | $this->recordIterator->next();
79 | }
80 |
81 | /**
82 | * {@inheritdoc}
83 | */
84 | public function key()
85 | {
86 | return $this->recordIterator->key();
87 | }
88 |
89 | /**
90 | * {@inheritdoc}
91 | */
92 | public function valid()
93 | {
94 | return $this->recordIterator->valid();
95 | }
96 |
97 | /**
98 | * {@inheritdoc}
99 | */
100 | public function rewind()
101 | {
102 | $this->recordIterator->rewind();
103 | }
104 |
105 | /**
106 | * Get first domain model object in collection
107 | *
108 | * @return mixed
109 | */
110 | public function first()
111 | {
112 | return $this->get(0);
113 | }
114 |
115 | /**
116 | * Get total number of records returned by Salesforce
117 | *
118 | * @return int
119 | */
120 | public function count()
121 | {
122 | return $this->recordIterator->count();
123 | }
124 |
125 | /**
126 | * Get object at key
127 | *
128 | * @param int $key
129 | * @return object | null
130 | */
131 | public function get($key)
132 | {
133 | $sObject = $this->recordIterator->seek($key);
134 | if (!$sObject) {
135 | return null;
136 | }
137 |
138 | return $this->mapper->mapToDomainObject($sObject, $this->modelClass);
139 | }
140 | }
--------------------------------------------------------------------------------
/MappedBulkSaver.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | class MappedBulkSaver implements MappedBulkSaverInterface
16 | {
17 | /**
18 | * @var BulkSaver
19 | */
20 | private $bulkSaver;
21 |
22 | /**
23 | * @var Mapper
24 | */
25 | private $mapper;
26 |
27 | /**
28 | * @var AnnotationReader
29 | */
30 | private $annotationReader;
31 |
32 | public function __construct(BulkSaverInterface $bulkSaver, Mapper $mapper,
33 | AnnotationReader $annotationReader)
34 | {
35 | $this->bulkSaver = $bulkSaver;
36 | $this->mapper = $mapper;
37 | $this->annotationReader = $annotationReader;
38 | }
39 |
40 | /**
41 | * {@inheritdoc}
42 | */
43 | public function save($model, $matchField = null)
44 | {
45 | $record = $this->mapper->mapToSalesforceObject($model, null !== $matchField);
46 | $objectMapping = $this->annotationReader->getSalesforceObject($model);
47 |
48 | $matchFieldName = null;
49 | if ($matchField) {
50 | $field = $this->annotationReader->getSalesforceField($model, $matchField);
51 | if (!$field) {
52 | throw new \InvalidArgumentException(sprintf(
53 | 'Invalid match field %s. Make sure to specify a mapped '
54 | . 'property’s name', $matchField)
55 | );
56 | }
57 | $matchFieldName = $field->name;
58 | }
59 |
60 | $this->bulkSaver->save($record, $objectMapping->name, $matchFieldName);
61 |
62 | return $this;
63 | }
64 |
65 | /**
66 | * {@inheritdoc}
67 | */
68 | public function delete($model)
69 | {
70 | $record = $this->mapper->mapToSalesforceObject($model);
71 |
72 | $this->bulkSaver->delete($record);
73 |
74 | return $this;
75 | }
76 |
77 | /**
78 | * {@inheritdoc}
79 | */
80 | public function flush()
81 | {
82 | return $this->bulkSaver->flush();
83 | }
84 |
85 | /**
86 | * Get bulk delete limit
87 | *
88 | * @return int
89 | */
90 | public function getBulkDeleteLimit()
91 | {
92 | return $this->bulkSaver->getBulkDeleteLimit();
93 | }
94 |
95 | /**
96 | * Set bulk delete limit
97 | *
98 | * @param int $bulkDeleteLimit
99 | * @return MappedBulkSaver
100 | */
101 | public function setBulkDeleteLimit($bulkDeleteLimit)
102 | {
103 | $this->bulkSaver->setBulkDeleteLimit($bulkDeleteLimit);
104 | return $this;
105 | }
106 |
107 | /**
108 | * Get bulk save limit
109 | *
110 | * @return int
111 | */
112 | public function getBulkSaveLimit()
113 | {
114 | return $this->bulkSaver->getBulkSaveLimit();
115 | }
116 |
117 | /**
118 | * Set bulk save limit
119 | *
120 | * @param int $bulkSaveLimit
121 | * @return MappedBulkSaver
122 | */
123 | public function setBulkSaveLimit($bulkSaveLimit)
124 | {
125 | $this->bulkSaver->setBulkSaveLimit($bulkSaveLimit);
126 | return $this;
127 | }
128 | }
129 |
--------------------------------------------------------------------------------
/Model/AccountContactRole.php:
--------------------------------------------------------------------------------
1 | account;
68 | }
69 |
70 | /**
71 | * Set account
72 | *
73 | * @param Account $account
74 | */
75 | public function setAccount($account)
76 | {
77 | $this->account = $account;
78 | $this->accountId = $account->getId();
79 | return $this;
80 | }
81 |
82 | public function getAccountId()
83 | {
84 | return $this->accountId;
85 | }
86 |
87 | public function setAccountId($accountId)
88 | {
89 | $this->accountId = $accountId;
90 | return $this;
91 | }
92 |
93 | /**
94 | * Get contact
95 | *
96 | * @return Contact
97 | */
98 | public function getContact()
99 | {
100 | return $this->contact;
101 | }
102 |
103 | /**
104 | * Set contact
105 | *
106 | * @param Contact $contact
107 | */
108 | public function setContact($contact)
109 | {
110 | $this->contact = $contact;
111 | $this->contactId = $contact->getId();
112 | return $this;
113 | }
114 |
115 | public function getContactId()
116 | {
117 | return $this->contactId;
118 | }
119 |
120 | public function setContactId($contactId)
121 | {
122 | $this->contactId = $contactId;
123 | return $this;
124 | }
125 |
126 | /**
127 | * Get is deleted
128 | *
129 | * @return boolean
130 | */
131 | public function isDeleted()
132 | {
133 | return $this->isDeleted;
134 | }
135 |
136 | /**
137 | * Get is primary
138 | *
139 | * @return boolean
140 | */
141 | public function isPrimary()
142 | {
143 | return $this->isPrimary;
144 | }
145 |
146 | /**
147 | * Set is primary
148 | *
149 | * @param boolean $isPrimary
150 | */
151 | public function setIsPrimary($isPrimary)
152 | {
153 | $this->isPrimary = $isPrimary;
154 | return $this;
155 | }
156 |
157 | /**
158 | * Get role
159 | *
160 | * @return string
161 | */
162 | public function getRole()
163 | {
164 | return $this->role;
165 | }
166 |
167 | /**
168 | * Set role
169 | *
170 | * @param string $role
171 | */
172 | public function setRole($role)
173 | {
174 | $this->role = $role;
175 | return $this;
176 | }
177 | }
178 |
--------------------------------------------------------------------------------
/Model/Attachment.php:
--------------------------------------------------------------------------------
1 | body;
83 | }
84 |
85 | public function setBody($body)
86 | {
87 | $this->body = $body;
88 | }
89 |
90 | public function getBodyLength()
91 | {
92 | return $this->bodyLength;
93 | }
94 |
95 | public function setBodyLength($bodyLength)
96 | {
97 | $this->bodyLength = $bodyLength;
98 | }
99 |
100 | public function getContentType()
101 | {
102 | return $this->contentType;
103 | }
104 |
105 | public function setContentType($contentType)
106 | {
107 | $this->contentType = $contentType;
108 | }
109 |
110 | public function getDescription()
111 | {
112 | return $this->description;
113 | }
114 |
115 | public function setDescription($description)
116 | {
117 | $this->description = $description;
118 | }
119 |
120 | public function getIsDeleted()
121 | {
122 | return $this->isDeleted;
123 | }
124 |
125 | public function getisProtected()
126 | {
127 | return $this->isProtected;
128 | }
129 |
130 | public function setisProtected($isProtected)
131 | {
132 | $this->isProtected = $isProtected;
133 | }
134 |
135 | public function getName()
136 | {
137 | return $this->name;
138 | }
139 |
140 | public function setName($name)
141 | {
142 | $this->name = $name;
143 | }
144 |
145 | public function getOwner()
146 | {
147 | return $this->owner;
148 | }
149 |
150 | public function setOwner($owner)
151 | {
152 | $this->owner = $owner;
153 | $this->ownerId = $owner->getId();
154 | }
155 |
156 | public function getOwnerId()
157 | {
158 | return $this->ownerId;
159 | }
160 |
161 | public function setOwnerId($ownerId)
162 | {
163 | $this->ownerId = $ownerId;
164 | }
165 |
166 | public function getParent()
167 | {
168 | return $this->parent;
169 | }
170 |
171 | public function setParent($parent)
172 | {
173 | $this->parent = $parent;
174 | }
175 |
176 | public function getParentId()
177 | {
178 | return $this->parentId;
179 | }
180 |
181 | public function setParentId($parentId)
182 | {
183 | $this->parentId = $parentId;
184 | }
185 | }
--------------------------------------------------------------------------------
/Resources/doc/index.md:
--------------------------------------------------------------------------------
1 | Ddeboer Salesforce Mapper Bundle
2 | ================================
3 |
4 | Introduction
5 | ------------
6 |
7 | This bundle provides transparent, object-oriented access to your Salesforce
8 | data.
9 |
10 | ### Features
11 |
12 | * Easily fetch records from Salesforce, and save these same records back to
13 | Salesforce: read-only fields are automatically ignored when saving.
14 | * Find by criteria, so you don’t have to roll your own SOQL queries.
15 | * Fetch related records in one go, so you save on
16 | [API calls](http://www.salesforce.com/us/developer/docs/api/Content/implementation_considerations.htm#topic-title_request_metering).
17 | * Adjust the mappings to retrieve and save records exactly like you want to.
18 | * The MappedBulkSaver helps you stay within your Salesforce API limits by using
19 | bulk creates, deletes, updates and upserts for mapped objects.
20 | * Completely unit tested (still working on that one).
21 |
22 | Installation
23 | ------------
24 |
25 | This bundle is available on [Packagist](http://packagist.org/packages/ddeboer/salesforce-mapper-bundle).
26 |
27 | ### 1. To add this bundle to your project, add the following to your `composer.json`:
28 |
29 | ```
30 | {
31 | ...
32 | "require": {
33 | ...,
34 | "ddeboer/salesforce-mapper-bundle": "*"
35 | ...
36 | },
37 | "minimum-stability": "dev"
38 | ...
39 | }
40 | ```
41 |
42 | ### 2. Install it:
43 |
44 | ```
45 | $ composer.phar update
46 | ```
47 |
48 | ### 3. Finally, add the bundle to your kernel:
49 |
50 | Add the following to `AppKernel.php`:
51 |
52 | ```
53 | public function registerBundles()
54 | {
55 | $bundles = array(
56 | ...
57 | new Phpforce\SalesforceBundle\PhpforceSalesforceBundle(),
58 | new Ddeboer\Salesforce\MapperBundle\DdeboerSalesforceMapperBundle(),
59 | ...
60 | );
61 | }
62 | ```
63 |
64 | Usage
65 | -----
66 |
67 | Once installed, the bundle offers several services:
68 |
69 | * a mapper: `ddeboer_salesforce_mapper`
70 | * a bulk saver: `ddeboer_salesforce_mapper.bulk_saver`.
71 |
72 | Use the mapper to fetch records from and save them to your organisation’s
73 | Salesforce data. An example:
74 |
75 | ```
76 | use Ddeboer\Salesforce\MapperBundle\Model;
77 |
78 | $result = $this->container->get('ddeboer_salesforce_mapper')->findBy(array(
79 | new Model\Opportunity(),
80 | array(
81 | 'Name' => 'Just an opportunity'
82 | )
83 | ));
84 | ```
85 |
86 | This will fetch all opportunities with the name ‘Just an opportunity’ from
87 | Salesforce. The mapper returns a `$result` as a `MappedRecordIterator`. You can
88 | iterate over this. Every element in the iterator is a full-fledged
89 | `Model\Opportunity` object.
90 |
91 | ```
92 | foreach ($result as $opportunity) {
93 | echo 'Opportunity id: ' . $opportunity->getId();
94 | }
95 | ```
96 |
97 | You can even fetch related records automatically:
98 |
99 | ```
100 | echo 'The opportunity belongs to: ' . $opportunity->getAccount()->getName();
101 | ```
102 |
103 | Or save them back:
104 |
105 | ```
106 | $account = $opportunity->getAccount();
107 | $account->setName('Name change!');
108 | $mapper->save($account);
109 | ```
110 |
111 | ### Fetching records
112 |
113 | #### Fetch all records
114 |
115 | ```
116 | $results = $mapper->findAll('Ddeboer\Salesforce\MapperBundle\Model\Task');
117 | ```
118 |
119 | ### Saving records
120 |
121 | If you create a new record and save it, the ID assigned to it by Salesforce is
122 | accessible with `getId()`.
123 |
124 | ```
125 | $account = new Ddeboer\Salesforce\MapperBundle\Model\Account();
126 | $account->setName('Some name');
127 | echo $account->getId(); // Returns null
128 |
129 | $mapper->save($account);
130 | echo $account->getId(); // Returns the new ID, e.g. `001D000000h0Jod`
131 | ```
132 |
133 | ### Custom objects and properties
134 |
135 | In the `Model` folder you will find several standard Salesforce objects. As this
136 | is a generic client bundle, this directory does not contain custom objects, nor
137 | do the objects in it have custom properties. If you would like to add custom
138 | objects or properties, please extend from AbstractModel or the models provided.
--------------------------------------------------------------------------------
/Annotation/AnnotationReader.php:
--------------------------------------------------------------------------------
1 | reader = $reader;
18 | }
19 |
20 | /**
21 | * Get Salesforce fields from model
22 | *
23 | * @param string $model Model class name
24 | * @return Field[] Array of field annotations
25 | */
26 | public function getSalesforceFields($modelClass)
27 | {
28 | $properties = $this->getSalesforceProperties($modelClass);
29 | return new ArrayCollection($properties['fields']);
30 | }
31 |
32 | /**
33 | * Get Salesforce field
34 | *
35 | * @param mixed $model Domain model object
36 | * @param string $field Field name
37 | * @return Field
38 | */
39 | public function getSalesforceField($model, $field)
40 | {
41 | $properties = $this->getSalesforceProperties($model);
42 | if (isset($properties['fields'][$field])) {
43 | return $properties['fields'][$field];
44 | }
45 | }
46 |
47 | public function getSalesforceRelations($model)
48 | {
49 | $properties = $this->getSalesforceProperties($model);
50 | return $properties['relations'];
51 | }
52 |
53 | /**
54 | * Get Salesforce object annotation
55 | *
56 | * @param string $model
57 | * @return Object
58 | */
59 | public function getSalesforceObject($model)
60 | {
61 | $properties = $this->getSalesforceProperties($model);
62 | return $properties['object'];
63 | }
64 |
65 | /**
66 | * Get Salesforce properties
67 | *
68 | * @param string $modelClass Model class name
69 | * @return array With keys 'object', 'relations' and 'fields'
70 | */
71 | public function getSalesforceProperties($modelClass)
72 | {
73 | $reflClass = new \ReflectionClass($modelClass);
74 | return $this->getSalesforcePropertiesFromReflectionClass($reflClass);
75 | }
76 |
77 | protected function getSalesforcePropertiesFromReflectionClass(\ReflectionClass $reflClass)
78 | {
79 | $salesforceProperties = array(
80 | 'object' => null,
81 | 'relations' => array(),
82 | 'fields' => array()
83 | );
84 |
85 | $classAnnotation = $this->reader->getClassAnnotation($reflClass,
86 | 'Ddeboer\Salesforce\MapperBundle\Annotation\Object'
87 | );
88 | if (isset($classAnnotation->name)) {
89 | $salesforceProperties['object'] = $classAnnotation;
90 | }
91 |
92 | $reflProperties = $reflClass->getProperties();
93 | foreach ($reflProperties as $reflProperty) {
94 | $propertyAnnotations = $this->reader->getPropertyAnnotations(
95 | $reflProperty, 'Ddeboer\Salesforce\MapperBundle\Annotation'
96 | );
97 |
98 |
99 | foreach ($propertyAnnotations as $key => $propertyAnnotation) {
100 | if ($propertyAnnotation instanceof Relation) {
101 | $salesforceProperties['relations'][$reflProperty->getName()] =
102 | $propertyAnnotation;
103 |
104 | } elseif ($propertyAnnotation instanceof Field) {
105 | $salesforceProperties['fields'][$reflProperty->getName()] =
106 | $propertyAnnotation;
107 | }
108 | }
109 | }
110 |
111 | if ($reflClass->getParentClass()) {
112 | $properties = $this->getSalesforcePropertiesFromReflectionClass(
113 | $reflClass->getParentClass()
114 | );
115 |
116 | $salesforceProperties['object'] = ($salesforceProperties['object'])
117 | ? $salesforceProperties['object']
118 | : $properties['object'];
119 |
120 | $salesforceProperties['fields'] = array_merge(
121 | $properties['fields'],
122 | $salesforceProperties['fields']
123 | );
124 |
125 | $salesforceProperties['relations'] = array_merge(
126 | $properties['relations'],
127 | $salesforceProperties['relations']
128 | );
129 | }
130 |
131 | return $salesforceProperties;
132 | }
133 | }
--------------------------------------------------------------------------------
/Model/Name.php:
--------------------------------------------------------------------------------
1 | id;
98 | }
99 |
100 | public function getAlias()
101 | {
102 | return $this->alias;
103 | }
104 |
105 | public function setAlias($alias)
106 | {
107 | $this->alias = $alias;
108 | }
109 |
110 | public function getEmail()
111 | {
112 | return $this->email;
113 | }
114 |
115 | public function setEmail($email)
116 | {
117 | $this->email = $email;
118 | }
119 |
120 | public function getFirstName()
121 | {
122 | return $this->FirstName;
123 | }
124 |
125 | public function setFirstName($firstName)
126 | {
127 | $this->FirstName = $firstName;
128 | }
129 |
130 | public function getIsActive()
131 | {
132 | return $this->isActive;
133 | }
134 |
135 | public function setIsActive($isActive)
136 | {
137 | $this->isActive = $isActive;
138 | }
139 |
140 | public function getLastName()
141 | {
142 | return $this->lastName;
143 | }
144 |
145 | public function setLastName($lastName)
146 | {
147 | $this->lastName = $lastName;
148 | }
149 |
150 | public function getName()
151 | {
152 | return $this->name;
153 | }
154 |
155 | public function getPhone()
156 | {
157 | return $this->phone;
158 | }
159 |
160 | public function setPhone($phone)
161 | {
162 | $this->phone = $phone;
163 | }
164 |
165 | public function getProfileId()
166 | {
167 | return $this->profileId;
168 | }
169 |
170 | public function setProfileId($profileId)
171 | {
172 | $this->profileId = $profileId;
173 | }
174 |
175 | public function getProfile()
176 | {
177 | return $this->profile;
178 | }
179 |
180 | public function setProfile($profile)
181 | {
182 | $this->profile = $profile;
183 | }
184 |
185 | public function getTitle()
186 | {
187 | return $this->title;
188 | }
189 |
190 | public function setTitle($title)
191 | {
192 | $this->title = $title;
193 | }
194 |
195 | public function getType()
196 | {
197 | return $this->type;
198 | }
199 |
200 | public function setType($type)
201 | {
202 | $this->type = $type;
203 | }
204 |
205 | public function getUserRole()
206 | {
207 | return $this->userRole;
208 | }
209 |
210 | public function setUserRole($userRole)
211 | {
212 | $this->userRole = $userRole;
213 | }
214 |
215 | public function getUserRoleId()
216 | {
217 | return $this->userRoleId;
218 | }
219 |
220 | public function setUserRoleId($userRoleId)
221 | {
222 | $this->userRoleId = $userRoleId;
223 | }
224 |
225 | public function getUsername()
226 | {
227 | return $this->username;
228 | }
229 |
230 | public function setUsername($username)
231 | {
232 | $this->username = $username;
233 | }
234 | }
--------------------------------------------------------------------------------
/Model/Campaign.php:
--------------------------------------------------------------------------------
1 | name;
62 | }
63 |
64 | /**
65 | * Set name
66 | *
67 | * @param string $name
68 | *
69 | * @return $this
70 | * @codeCoverageIgnore
71 | */
72 | public function setName($name)
73 | {
74 | $this->name = $name;
75 | }
76 |
77 | /**
78 | * Get start date
79 | *
80 | * @return \DateTime
81 | * @codeCoverageIgnore
82 | */
83 | public function getStartDate()
84 | {
85 | return $this->startDate;
86 | }
87 |
88 | /**
89 | * Set start date
90 | *
91 | * @param \DateTime $startDate
92 | *
93 | * @return $this
94 | * @codeCoverageIgnore
95 | */
96 | public function setStartDate(\DateTime $startDate)
97 | {
98 | $this->startDate = $startDate;
99 |
100 | return $this;
101 | }
102 |
103 | /**
104 | * Get end date
105 | *
106 | * @return \DateTime
107 | * @codeCoverageIgnore
108 | */
109 | public function getEndDate()
110 | {
111 | return $this->endDate;
112 | }
113 |
114 | /**
115 | * Set end date
116 | *
117 | * @param \DateTime $endDate
118 | *
119 | * @return $this
120 | * @codeCoverageIgnore
121 | */
122 | public function setEndDate(\DateTime $endDate)
123 | {
124 | $this->endDate = $endDate;
125 |
126 | return $this;
127 | }
128 |
129 | /**
130 | * Get status
131 | *
132 | * @return string
133 | * @codeCoverageIgnore
134 | */
135 | public function getStatus()
136 | {
137 | return $this->status;
138 | }
139 |
140 | /**
141 | * Set status
142 | *
143 | * @param string $status
144 | *
145 | * @return $this
146 | * @codeCoverageIgnore
147 | */
148 | public function setStatus($status)
149 | {
150 | $this->status = $status;
151 |
152 | return $this;
153 | }
154 |
155 | /**
156 | * Is the campaign active?
157 | *
158 | * @return boolean
159 | * @codeCoverageIgnore
160 | */
161 | public function isActive()
162 | {
163 | return $this->isActive;
164 | }
165 |
166 | /**
167 | * Set active
168 | *
169 | * @param boolean $isActive
170 | *
171 | * @return $this
172 | * @codeCoverageIgnore
173 | */
174 | public function setActive($isActive)
175 | {
176 | $this->isActive = $isActive;
177 |
178 | return $this;
179 | }
180 |
181 | /**
182 | * Is deleted?
183 | *
184 | * @return boolean
185 | * @codeCoverageIgnore
186 | */
187 | public function isDeleted()
188 | {
189 | return $this->isDeleted;
190 | }
191 |
192 | /**
193 | * Get parent id
194 | *
195 | * @return string
196 | * @codeCoverageIgnore
197 | */
198 | public function getParentId()
199 | {
200 | return $this->parentId;
201 | }
202 |
203 | /**
204 | * Set parent id
205 | *
206 | * @param string $parentId
207 | *
208 | * @return $this
209 | * @codeCoverageIgnore
210 | */
211 | public function setParentId($parentId)
212 | {
213 | $this->parentId = $parentId;
214 |
215 | return $this;
216 | }
217 |
218 | /**
219 | * Get type
220 | *
221 | * @return string
222 | * @codeCoverageIgnore
223 | */
224 | public function getType()
225 | {
226 | return $this->type;
227 | }
228 |
229 | /**
230 | * Set type
231 | *
232 | * @param string $type
233 | *
234 | * @return $this
235 | * @codeCoverageIgnore
236 | */
237 | public function setType($type)
238 | {
239 | $this->type = $type;
240 |
241 | return $this;
242 | }
243 | }
244 |
245 |
--------------------------------------------------------------------------------
/Model/CampaignMember.php:
--------------------------------------------------------------------------------
1 | campaign;
63 | }
64 |
65 | /**
66 | * Set campaign
67 | *
68 | * @param Campaign $campaign
69 | *
70 | * @return $this
71 | * @codeCoverageIgnore
72 | */
73 | public function setCampaign(Campaign $campaign)
74 | {
75 | $this->campaign = $campaign;
76 |
77 | return $this;
78 | }
79 |
80 |
81 | /**
82 | * Get campaign id
83 | *
84 | * @return string
85 | * @codeCoverageIgnore
86 | */
87 | public function getCampaignId()
88 | {
89 | return $this->campaignId;
90 | }
91 |
92 | /**
93 | * Set campaign id
94 | *
95 | * @param string $campaignI
96 | *
97 | * @return $this
98 | * @codeCoverageIgnore
99 | */
100 | public function setCampaignId($campaignId)
101 | {
102 | $this->campaignId = $campaignId;
103 |
104 | return $this;
105 | }
106 |
107 | /**
108 | * Get contact
109 | *
110 | * @return Contact
111 | * @codeCoverageIgnore
112 | */
113 | public function getContact()
114 | {
115 | return $this->contact;
116 | }
117 |
118 | /**
119 | * Set contact
120 | *
121 | * @param Contact $contact
122 | *
123 | * @return $this
124 | * @codeCoverageIgnore
125 | */
126 | public function setContact($contact)
127 | {
128 | $this->contact = $contact;
129 |
130 | return $this;
131 | }
132 |
133 | /**
134 | * Get contact id
135 | *
136 | * @return string
137 | * @codeCoverageIgnore
138 | */
139 | public function getContactId()
140 | {
141 | return $this->contactId;
142 | }
143 |
144 | /**
145 | * Set contact id
146 | *
147 | * @param string $contactId
148 | *
149 | * @return $this
150 | * @codeCoverageIgnore
151 | */
152 | public function setContactId($contactId)
153 | {
154 | $this->contactId = $contactId;
155 | }
156 |
157 | /**
158 | * Get lead
159 | *
160 | * @return Lead
161 | */
162 | public function getLead()
163 | {
164 | return $this->lead;
165 | }
166 |
167 | /**
168 | * Set lead
169 | *
170 | * @param Lead $lead
171 | *
172 | * @return $this
173 | */
174 | public function setLead(Lead $lead = null)
175 | {
176 | $this->lead = $lead;
177 |
178 | return $this;
179 | }
180 |
181 | /**
182 | * Get lead id
183 | *
184 | * @return string
185 | * @codeCoverageIgnore
186 | */
187 | public function getLeadId()
188 | {
189 | return $this->leadId;
190 | }
191 |
192 | /**
193 | * Set lead id
194 | *
195 | * @param string $leadId
196 | *
197 | * @return $this
198 | * @codeCoverageIgnore
199 | */
200 | public function setLeadId($leadId)
201 | {
202 | $this->leadId = $leadId;
203 |
204 | return $this;
205 | }
206 |
207 | /**
208 | * Get status
209 | *
210 | * @return string
211 | * @codeCoverageIgnore
212 | */
213 | public function getStatus()
214 | {
215 | return $this->status;
216 | }
217 |
218 | /**
219 | * Set status
220 | *
221 | * @param string $status
222 | *
223 | * @return $this
224 | * @codeCoverageIgnore
225 | */
226 | public function setStatus($status)
227 | {
228 | $this->status = $status;
229 |
230 | return $this;
231 | }
232 | }
233 |
234 |
--------------------------------------------------------------------------------
/Model/OpportunityLineItem.php:
--------------------------------------------------------------------------------
1 | description;
88 | }
89 |
90 | public function setDescription($description)
91 | {
92 | $this->description = $description;
93 | return $this;
94 | }
95 |
96 | public function isDeleted()
97 | {
98 | return $this->isDeleted;
99 | }
100 |
101 | public function getListPrice()
102 | {
103 | return $this->listPrice;
104 | }
105 |
106 | public function setListPrice($listPrice)
107 | {
108 | $this->listPrice = $listPrice;
109 | return $this;
110 | }
111 |
112 | public function getOpportunity()
113 | {
114 | return $this->opportunity;
115 | }
116 |
117 | public function setOpportunity($opportunity)
118 | {
119 | $this->opportunity = $opportunity;
120 | $this->opportunityId = $opportunity->getId();
121 | return $this;
122 | }
123 |
124 | public function getOpportunityId()
125 | {
126 | return $this->opportunityId;
127 | }
128 |
129 | public function setOpportunityId($opportunityId)
130 | {
131 | $this->opportunityId = $opportunityId;
132 | return $this;
133 | }
134 |
135 | public function getPricebookEntry()
136 | {
137 | return $this->pricebookEntry;
138 | }
139 |
140 | public function setPricebookEntry($pricebookEntry)
141 | {
142 | $this->pricebookEntry = $pricebookEntry;
143 | return $this;
144 | }
145 |
146 | public function getPricebookEntryId()
147 | {
148 | return $this->pricebookEntryId;
149 | }
150 |
151 | public function setPricebookEntryId($pricebookEntryId)
152 | {
153 | $this->pricebookEntryId = $pricebookEntryId;
154 | return $this;
155 | }
156 |
157 | public function getQuantity()
158 | {
159 | return $this->quantity;
160 | }
161 |
162 | public function setQuantity($quantity)
163 | {
164 | $this->quantity = $quantity;
165 | return $this;
166 | }
167 |
168 | public function getServiceDate()
169 | {
170 | return $this->serviceDate;
171 | }
172 |
173 | public function setServiceDate(\DateTime $serviceDate)
174 | {
175 | $this->serviceDate = $serviceDate;
176 | return $this;
177 | }
178 |
179 | public function getSortOrder()
180 | {
181 | return $this->sortOrder;
182 | }
183 |
184 | public function setSortOrder($sortOrder)
185 | {
186 | $this->sortOrder = $sortOrder;
187 | return $this;
188 | }
189 |
190 | public function getTotalPrice()
191 | {
192 | return $this->totalPrice;
193 | }
194 |
195 | public function setTotalPrice($totalPrice)
196 | {
197 | $this->totalPrice = $totalPrice;
198 | return $this;
199 | }
200 |
201 | public function getUnitPrice()
202 | {
203 | return $this->unitPrice;
204 | }
205 |
206 | public function setUnitPrice($unitPrice)
207 | {
208 | $this->unitPrice = $unitPrice;
209 | return $this;
210 | }
211 | }
--------------------------------------------------------------------------------
/Query/Builder.php:
--------------------------------------------------------------------------------
1 | mapper = $mapper;
23 | $this->client = $client;
24 | $this->annotationReader = $annotationReader;
25 | }
26 |
27 | public function select($select)
28 | {
29 | if (is_array($select)) {
30 | $this->selectFields += $select;
31 | } else {
32 | $this->selectFields[] = $select;
33 | }
34 |
35 | return $this;
36 | }
37 |
38 | public function from($objectType)
39 | {
40 | $this->from[] = $objectType;
41 | return $this;
42 | }
43 |
44 | /**
45 | *
46 | * @param string|array $predicate Where predicate: can be either a string,
47 | * e.g. name = "Something", or
48 | * an array
49 | * @return Builder
50 | */
51 | public function where($predicate)
52 | {
53 | if (is_array($predicate)) {
54 | $this->where = $predicate;
55 | } else {
56 | $this->where[] = $predicate;
57 | }
58 | return $this;
59 | }
60 |
61 | public function andWhere($predicate)
62 | {
63 | $this->where[] = ' AND ' . $predicate;
64 | return $this;
65 | }
66 |
67 | public function orWhere($predicate)
68 | {
69 | $this->where[] = ' OR ' . $predicate;
70 | }
71 |
72 | private function getMappedSelectFields()
73 | {
74 | if (count($this->selectFields) > 0) {
75 | return $this->getMappedFields($this->selectFields);
76 | } else {
77 | // No no select fields supplied, so get them all
78 | return $this->mapper->getFields($this->from[0], 1);
79 | }
80 | }
81 |
82 | private function getMappedFields(array $fields)
83 | {
84 | if (count($fields) > 0) {
85 | $mappedFields = array();
86 | foreach ($fields as $field) {
87 | $mappedFields[] = $this->annotationReader->getSalesforceField(
88 | $this->from[0], $field
89 | )->name;
90 | }
91 | }
92 |
93 | return $mappedFields;
94 | }
95 |
96 | private function getFromObject()
97 | {
98 | return $this->annotationReader->getSalesforceObject($this->from[0])->name;
99 | }
100 |
101 | private function getWhereString()
102 | {
103 | if (0 === count($this->where)) {
104 | return;
105 | }
106 |
107 | $whereString = ' WHERE ';
108 | foreach ($this->where as $where) {
109 | preg_match('/(AND |OR )?(\w+) *([!=><]+|LIKE) *[\'"]?(.*)[\'"]?/i', $where,
110 | $matches);
111 |
112 | list($all, $connector, $field, $operator, $value) = $matches;
113 | $salesforceFieldName = $this->annotationReader
114 | ->getSalesforceField($this->from[0], $field)->name;
115 | $whereString .= $connector . $salesforceFieldName . $operator
116 | . $this->quoteValue($value) . ' ';
117 | }
118 |
119 | return rtrim($whereString);
120 | }
121 |
122 | private function quoteValue($value)
123 | {
124 | if ($value == 'null') {
125 | return $value;
126 | } else {
127 | return '\'' . $value . '\'';
128 | }
129 | }
130 |
131 | /**
132 | *
133 | * @return Query
134 | */
135 | public function getQuery()
136 | {
137 | $query = 'SELECT '
138 | . implode(',', $this->getMappedSelectFields())
139 | . ' FROM '
140 | . $this->getFromObject();
141 |
142 | if (count($this->where) > 0) {
143 | $query .= $this->getWhereString();
144 | }
145 |
146 | if (isset($this->groupBy['fields'])) {
147 | $query .= ' GROUP BY '
148 | . implode(',', $this->getMappedFields($this->groupBy['fields']));
149 |
150 | if (isset($this->groupBy['having'])) {
151 | $query .= ' HAVING ' . $this->groupBy['having'];
152 | }
153 | }
154 |
155 | if (null !== $this->limit) {
156 | $query .= ' LIMIT ' . $this->limit;
157 | }
158 |
159 | return new Query($this->mapper, $this->client, $query, $this->from[0]);
160 | }
161 |
162 | public function in()
163 | {
164 |
165 | }
166 |
167 | public function groupBy($fields, $having)
168 | {
169 | $this->groupBy = array(
170 | 'fields' => is_array($fields) ? $fields : array($fields),
171 | 'having' => $having);
172 | return $this;
173 | }
174 |
175 | public function having($having)
176 | {
177 | $this->having = $having;
178 | return $this;
179 | }
180 |
181 | public function limit($limit)
182 | {
183 | $this->limit = (int) $limit;
184 | return $this;
185 | }
186 |
187 | public function setParameter($key, $value)
188 | {
189 | $this->parameters[$key] = $value;
190 | }
191 | }
--------------------------------------------------------------------------------
/Tests/MapperTest.php:
--------------------------------------------------------------------------------
1 | getClient();
22 | $client->expects($this->once())
23 | ->method('query')
24 | ->with('select count() from Account')
25 | ->will($this->returnValue(new RecordIterator($client, $result)));
26 | $this->assertEquals(15, $this->getMapper($client)->count(new Model\Account()));
27 | }
28 |
29 | public function testBuildQuery()
30 | {
31 | return;
32 | $client = $this->getMockBuilder('Ddeboer\Salesforce\ClientBundle\Client')
33 | ->disableOriginalConstructor()
34 | ->getMock();
35 |
36 | $client
37 | ->expects($this->at(0))
38 | ->method('getFieldType')
39 | ->with('Task', 'Id')
40 | ->will($this->returnValue('string'));
41 |
42 | $client
43 | ->expects($this->at(1))
44 | ->method('getFieldType')
45 | ->with('Task', 'OwnerId')
46 | ->will($this->returnValue('string'));
47 |
48 | $client
49 | ->expects($this->at(2))
50 | ->method('getFieldType')
51 | ->with('Task', 'Subject')
52 | ->will($this->returnValue('string'));
53 |
54 | $queryResult = new QueryResult();
55 | $queryResult->done = true;
56 | $queryResult->records = array(
57 | (object) array(
58 | 'Id' => '00TM0000003YlJ6',
59 | 'Subject' => 'A subject',
60 | 'OwnerId' => '123'
61 | )
62 | );
63 | $client
64 | ->expects($this->once())
65 | ->method('query')
66 | ->with("select Id,Subject,OwnerId from Task where Id = '00TM0000003YlJ6' LIMIT 1")
67 | ->will($this->returnValue(new RecordIterator($client, $queryResult)));
68 |
69 | $annotationReader = $this->getMockBuilder(
70 | 'Ddeboer\Salesforce\MapperBundle\Annotation\AnnotationReader'
71 | )
72 | ->disableOriginalConstructor()
73 | ->getMock();
74 |
75 | $annotationReader
76 | ->expects($this->exactly(3))
77 | ->method('getSalesforceFields')
78 | ->with(new Model\Task())
79 | ->will($this->returnValue(new ArrayCollection(array(
80 | new Annotation\Field(array('name' => 'Id')),
81 | new Annotation\Field(array('name' => 'Subject')),
82 | new Annotation\Field(array('name' => 'OwnerId'))
83 | ))));
84 |
85 | $annotationReader
86 | ->expects($this->once())
87 | ->method('getSalesforceRelations')
88 | ->with(new Model\Task())
89 | ->will($this->returnValue(array()));
90 |
91 | $annotationReader
92 | ->expects($this->any())
93 | ->method('getSalesforceObject')
94 | ->with(new Model\Task())
95 | ->will($this->returnValue(
96 | new Annotation\Object(array('name' => 'Task'))
97 | ));
98 |
99 | $mapper = new Mapper($client, $annotationReader);
100 | $task = $mapper->find(new Model\Task(), '00TM0000003YlJ6');
101 | var_dump($task);
102 | }
103 |
104 | public function testEventIsDispatched()
105 | {
106 | $account1 = new Mock\AccountMock();
107 | $account1->setName('First account');
108 |
109 | $account2 = new Mock\AccountMock();
110 | $account2->setName('Second account');
111 |
112 | $client = $this->getClient();
113 | $client->expects($this->any())
114 | ->method('create')
115 | ->with(array(
116 | (object) array(
117 | 'Name' => 'First account',
118 | 'fieldsToNull' => array()
119 | ),
120 | (object) array(
121 | 'Name' => 'Second account with altered name',
122 | 'fieldsToNull' => array()
123 | )
124 | ), 'Account'
125 | );
126 |
127 | $mapper = $this->getMapper($client);
128 | $dispatcher = new EventDispatcher();
129 | $dispatcher->addListener(Events::beforeSave, function($event) {
130 | $objects = $event->getObjects();
131 | $objects[1]->setName('Second account with altered name');
132 |
133 | });
134 | $mapper->setEventDispatcher($dispatcher);
135 | $mapper->save(array($account1, $account2));
136 | }
137 |
138 | public function testResultIdIsSetOnModel()
139 | {
140 | $account = new Mock\AccountMock();
141 | $account->setName('An account');
142 |
143 | $task = new Mock\TaskMock();
144 | $task->setSubject('A task');
145 |
146 | $client = $this->getClient(array('create'));
147 |
148 | $saveResult1 = new Mock\SaveResultMock('001D000000mDq9D');
149 | $saveResult2 = new Mock\SaveResultMock('00TD0000015m79U');
150 |
151 | $client->expects($this->any())
152 | ->method('create')
153 | ->will($this->returnCallback(function($input, $type) use (
154 | $saveResult1, $saveResult2
155 | ) {
156 | switch ($type) {
157 | case 'Account':
158 | return array($saveResult1);
159 | case 'Task':
160 | return array($saveResult2);
161 | }
162 | }));
163 |
164 | $mapper = $this->getMapper($client);
165 | $mapper->save(array($account, $task));
166 | $this->assertEquals('001D000000mDq9D', $account->getId());
167 | $this->assertEquals('00TD0000015m79U', $task->getId());
168 | }
169 |
170 | public function testFetchOneToManyRelationMustNotContainManySideTwice()
171 | {
172 | $client = $this->getClient();
173 | $client->expects($this->once())
174 | ->method('query')
175 | ->with('select Id,Name, (select Id,Contact.Id,Contact.FirstName,Contact.LastName from AccountContactRoles) from Account where Id=\'1\'')
176 | ->will($this->returnValue(new RecordIterator($client, new Mock\QueryResultMock(1))));
177 | $mapper = $this->getMapper($client);
178 |
179 | $this->assertNull($mapper->find(new Mock\AccountMock(), 1));
180 | }
181 |
182 | public function testBuildQueryWhereValueIsArray()
183 | {
184 | $queryResult = new Mock\QueryResultMock(2, true, array(
185 | (object) array(
186 | 'Id' => '0010000000xxxx1',
187 | 'Name' => 'Test Account 1'
188 | ),
189 | (object) array(
190 | 'Id' => '0010000000xxxx2',
191 | 'Name' => 'Test Account 2'
192 | )
193 | ));
194 |
195 | $client = $this->getClient();
196 | $client->expects($this->once())
197 | ->method('query')
198 | ->with("select Id,Name from Account where Id in ('0010000000xxxx1','0010000000xxxx2')")
199 | ->will($this->returnValue(new RecordIterator($client, $queryResult)));
200 | ;
201 |
202 | $mapper = $this->getMapper($client);
203 | $mapper->findBy(new Mock\AccountMock(), array(
204 | 'id in' => array('0010000000xxxx1', '0010000000xxxx2')
205 | ), array(), 0);
206 | }
207 |
208 | protected function getClient()
209 | {
210 | $client = $this->getMockBuilder('\Phpforce\SoapClient\Client')
211 | ->disableOriginalConstructor()
212 | ->getMock();
213 |
214 | $client->expects($this->any())
215 | ->method('describeSObjects')
216 | ->will($this->returnCallback(function($value) {
217 | $object = reset($value);
218 | switch ($object) {
219 | case 'Account':
220 | return array(new Mock\DescribeAccountResult());
221 | case 'Contact':
222 | return array(new Mock\DescribeContactResult());
223 | case 'AccountContactRole':
224 | return array(new Mock\DescribeAccountContactRoleResult());
225 | case 'Task':
226 | return array(new Mock\DescribeTaskResult());
227 | }
228 | }));
229 |
230 | return $client;
231 | }
232 |
233 | /**
234 | * @return Mapper
235 | */
236 | protected function getMapper($client)
237 | {
238 | $annotationReader = new \Doctrine\Common\Annotations\AnnotationReader();
239 | $salesforceAnnotationReader = new Annotation\AnnotationReader($annotationReader);
240 | $cache = $this->getMockBuilder('Ddeboer\Salesforce\MapperBundle\Cache\FileCache')
241 | ->disableOriginalConstructor()
242 | ->getMock();
243 |
244 | $mapper = new Mapper($client, $salesforceAnnotationReader, $cache);
245 | return $mapper;
246 | }
247 | }
--------------------------------------------------------------------------------
/Model/Lead.php:
--------------------------------------------------------------------------------
1 | name;
130 | }
131 |
132 | /**
133 | * Get company
134 | *
135 | * @return string
136 | */
137 | public function getCompany()
138 | {
139 | return $this->company;
140 | }
141 |
142 | /**
143 | * Set company
144 | *
145 | * @param string $company
146 | *
147 | * @return $this
148 | */
149 | public function setCompany($company)
150 | {
151 | $this->company = $company;
152 |
153 | return $this;
154 | }
155 |
156 | /**
157 | * Get postal code
158 | *
159 | * @return string
160 | */
161 | public function getPostalCode()
162 | {
163 | return $this->postalCode;
164 | }
165 |
166 | /**
167 | * Set postal code
168 | *
169 | * @param string $postalCode
170 | *
171 | * @return $this
172 | */
173 | public function setPostalCode($postalCode)
174 | {
175 | $this->postalCode = $postalCode;
176 |
177 | return $this;
178 | }
179 |
180 | /**
181 | * Get city
182 | *
183 | * @return string
184 | */
185 | public function getCity()
186 | {
187 | return $this->city;
188 | }
189 |
190 | /**
191 | * Set city
192 | *
193 | * @param string $city
194 | *
195 | * @return $this
196 | */
197 | public function setCity($city)
198 | {
199 | $this->city = $city;
200 |
201 | return $this;
202 | }
203 |
204 | /**
205 | * Get street
206 | *
207 | * @return string
208 | */
209 | public function getStreet()
210 | {
211 | return $this->street;
212 | }
213 |
214 | /**
215 | * Set street
216 | *
217 | * @param string $street
218 | *
219 | * @return $this
220 | */
221 | public function setStreet($street)
222 | {
223 | $this->street = $street;
224 |
225 | return $this;
226 | }
227 |
228 | /**
229 | * Get lead source
230 | *
231 | * @return string
232 | */
233 | public function getLeadSource()
234 | {
235 | return $this->leadSource;
236 | }
237 |
238 | /**
239 | * Set lead source
240 | *
241 | * @param string $leadSource
242 | *
243 | * @return $this
244 | */
245 | public function setLeadSource($leadSource)
246 | {
247 | $this->leadSource = $leadSource;
248 |
249 | return $this;
250 | }
251 |
252 | /**
253 | * Get first name
254 | *
255 | * @return string
256 | */
257 | public function getFirstName()
258 | {
259 | return $this->firstName;
260 | }
261 |
262 | /**
263 | * Set first name
264 | *
265 | * @param string $firstName
266 | *
267 | * @return $this
268 | */
269 | public function setFirstName($firstName)
270 | {
271 | $this->firstName = $firstName;
272 |
273 | return $this;
274 | }
275 |
276 | /**
277 | * Get last name
278 | *
279 | * @return string
280 | */
281 | public function getLastName()
282 | {
283 | return $this->lastName;
284 | }
285 |
286 | /**
287 | * Set last name
288 | *
289 | * @param string $lastName
290 | *
291 | * @return $this
292 | */
293 | public function setLastName($lastName)
294 | {
295 | $this->lastName = $lastName;
296 |
297 | return $this;
298 | }
299 |
300 | /**
301 | * Get salutation
302 | *
303 | * @return string
304 | */
305 | public function getSalutation()
306 | {
307 | return $this->salutation;
308 | }
309 |
310 | /**
311 | * Set salutation
312 | *
313 | * @param string $salutation
314 | *
315 | * @return $this
316 | */
317 | public function setSalutation($salutation)
318 | {
319 | $this->salutation = $salutation;
320 |
321 | return $this;
322 | }
323 |
324 | /**
325 | * Get e-mail address
326 | *
327 | * @return string
328 | */
329 | public function getEmail()
330 | {
331 | return $this->email;
332 | }
333 |
334 | /**
335 | * Set e-mail address
336 | *
337 | * @param string $email
338 | *
339 | * @return $this
340 | */
341 | public function setEmail($email)
342 | {
343 | $this->email = $email;
344 |
345 | return $this;
346 | }
347 |
348 | /**
349 | * Get phone
350 | *
351 | * @return string
352 | */
353 | public function getPhone()
354 | {
355 | return $this->phone;
356 | }
357 |
358 | /**
359 | * Set phone
360 | *
361 | * @param string $phone
362 | *
363 | * @return $this
364 | */
365 | public function setPhone($phone)
366 | {
367 | $this->phone = $phone;
368 |
369 | return $this;
370 | }
371 |
372 | /**
373 | * Get description
374 | *
375 | * @return string
376 | */
377 | public function getDescription()
378 | {
379 | return $this->description;
380 | }
381 |
382 | /**
383 | * Set description
384 | *
385 | * @param string $description
386 | *
387 | * @return $this
388 | */
389 | public function setDescription($description)
390 | {
391 | $this->description = $description;
392 |
393 | return $this;
394 | }
395 |
396 | /**
397 | * Get status
398 | *
399 | * @return string
400 | */
401 | public function getStatus()
402 | {
403 | return $this->status;
404 | }
405 |
406 | /**
407 | * Set status
408 | *
409 | * @param string $status
410 | *
411 | * @return $this
412 | */
413 | public function setStatus($status)
414 | {
415 | $this->status = $status;
416 |
417 | return $this;
418 | }
419 |
420 | /**
421 | * Get owner id
422 | *
423 | * @return string
424 | */
425 | public function getOwnerId()
426 | {
427 | return $this->ownerId;
428 | }
429 |
430 | /**
431 | * Set owner id
432 | *
433 | * @param string $ownerId
434 | *
435 | * @return $this
436 | */
437 | public function setOwnerId($ownerId)
438 | {
439 | $this->ownerId = $ownerId;
440 |
441 | return $this;
442 | }
443 |
444 | /**
445 | * Is converted?
446 | *
447 | * @return bool
448 | */
449 | public function isConverted()
450 | {
451 | return $this->isConverted;
452 | }
453 |
454 | /**
455 | * Get converted account id
456 | *
457 | * @return string
458 | */
459 | public function getConvertedAccountId()
460 | {
461 | return $this->convertedAccountId;
462 | }
463 |
464 | /**
465 | * Get converted contact id
466 | *
467 | * @return string
468 | */
469 | public function getConvertedContactId()
470 | {
471 | return $this->convertedContactId;
472 | }
473 |
474 | public function getFax()
475 | {
476 | return $this->fax;
477 | }
478 |
479 | public function setFax($fax)
480 | {
481 | $this->fax = $fax;
482 | }
483 | }
484 |
485 |
--------------------------------------------------------------------------------
/Model/Task.php:
--------------------------------------------------------------------------------
1 | account;
230 | }
231 |
232 | public function getAccountId()
233 | {
234 | return $this->accountId;
235 | }
236 |
237 | public function getActivityDate()
238 | {
239 | return $this->activityDate;
240 | }
241 |
242 | public function setActivityDate(\DateTime $activityDate)
243 | {
244 | $this->activityDate = $activityDate;
245 | }
246 |
247 | public function getAttachments()
248 | {
249 | return $this->attachments;
250 | }
251 |
252 | public function setAttachments($attachments)
253 | {
254 | $this->attachments = $attachments;
255 | }
256 |
257 | public function getCallDisposition()
258 | {
259 | return $this->callDisposition;
260 | }
261 |
262 | public function setCallDisposition($callDisposition)
263 | {
264 | $this->callDisposition = $callDisposition;
265 | }
266 |
267 | public function getCallDurationInSeconds()
268 | {
269 | return $this->callDurationInSeconds;
270 | }
271 |
272 | public function setCallDurationInSeconds($callDurationInSeconds)
273 | {
274 | $this->callDurationInSeconds = $callDurationInSeconds;
275 | }
276 |
277 | public function getCallObject()
278 | {
279 | return $this->callObject;
280 | }
281 |
282 | public function setCallObject($callObject)
283 | {
284 | $this->callObject = $callObject;
285 | }
286 |
287 | public function getCallType()
288 | {
289 | return $this->callType;
290 | }
291 |
292 | public function setCallType($callType)
293 | {
294 | $this->callType = $callType;
295 | }
296 |
297 | public function getDescription()
298 | {
299 | return $this->description;
300 | }
301 |
302 | public function setDescription($description)
303 | {
304 | $this->description = $description;
305 | }
306 |
307 | public function getFeedSubscriptionsForEntity()
308 | {
309 | return $this->feedSubscriptionsForEntity;
310 | }
311 |
312 | public function setFeedSubscriptionsForEntity($feedSubscriptionsForEntity)
313 | {
314 | $this->feedSubscriptionsForEntity = $feedSubscriptionsForEntity;
315 | }
316 |
317 | public function getFeeds()
318 | {
319 | return $this->feeds;
320 | }
321 |
322 | public function setFeeds($feeds)
323 | {
324 | $this->feeds = $feeds;
325 | }
326 |
327 | public function isArchived()
328 | {
329 | return $this->isArchived;
330 | }
331 |
332 | public function isClosed()
333 | {
334 | return $this->isClosed;
335 | }
336 |
337 | public function isDeleted()
338 | {
339 | return $this->isDeleted;
340 | }
341 |
342 | public function isRecurrence()
343 | {
344 | return $this->isRecurrence;
345 | }
346 |
347 | public function isReminderSet()
348 | {
349 | return $this->isReminderSet;
350 | }
351 |
352 | public function setIsReminderSet($isReminderSet)
353 | {
354 | $this->isReminderSet = $isReminderSet;
355 | }
356 |
357 | public function getOwner()
358 | {
359 | return $this->owner;
360 | }
361 |
362 | public function setOwner(Name $owner)
363 | {
364 | $this->owner = $owner;
365 | $this->ownerId = $owner->getId();
366 | }
367 |
368 | public function getOwnerId()
369 | {
370 | return $this->ownerId;
371 | }
372 |
373 | public function setOwnerId($ownerId)
374 | {
375 | $this->ownerId = $ownerId;
376 | }
377 |
378 | public function getPriority()
379 | {
380 | return $this->priority;
381 | }
382 |
383 | public function setPriority($priority)
384 | {
385 | $this->priority = $priority;
386 | }
387 |
388 | public function getRecurrenceActivityId()
389 | {
390 | return $this->recurrenceActivityId;
391 | }
392 |
393 | public function setRecurrenceActivityId($recurrenceActivityId)
394 | {
395 | $this->recurrenceActivityId = $recurrenceActivityId;
396 | }
397 |
398 | public function getRecurrenceDayOfMonth()
399 | {
400 | return $this->recurrenceDayOfMonth;
401 | }
402 |
403 | public function setRecurrenceDayOfMonth($recurrenceDayOfMonth)
404 | {
405 | $this->recurrenceDayOfMonth = $recurrenceDayOfMonth;
406 | }
407 |
408 | public function getRecurrenceDayOfWeekMask()
409 | {
410 | return $this->recurrenceDayOfWeekMask;
411 | }
412 |
413 | public function setRecurrenceDayOfWeekMask($recurrenceDayOfWeekMask)
414 | {
415 | $this->recurrenceDayOfWeekMask = $recurrenceDayOfWeekMask;
416 | }
417 |
418 | public function getRecurrenceEndDateOnly()
419 | {
420 | return $this->recurrenceEndDateOnly;
421 | }
422 |
423 | public function setRecurrenceEndDateOnly($recurrenceEndDateOnly)
424 | {
425 | $this->recurrenceEndDateOnly = $recurrenceEndDateOnly;
426 | }
427 |
428 | public function getRecurrenceInstance()
429 | {
430 | return $this->recurrenceInstance;
431 | }
432 |
433 | public function setRecurrenceInstance($recurrenceInstance)
434 | {
435 | $this->recurrenceInstance = $recurrenceInstance;
436 | }
437 |
438 | public function getRecurrenceInterval()
439 | {
440 | return $this->recurrenceInterval;
441 | }
442 |
443 | public function setRecurrenceInterval($recurrenceInterval)
444 | {
445 | $this->recurrenceInterval = $recurrenceInterval;
446 | }
447 |
448 | public function getRecurrenceMonthOfYear()
449 | {
450 | return $this->recurrenceMonthOfYear;
451 | }
452 |
453 | public function setRecurrenceMonthOfYear($recurrenceMonthOfYear)
454 | {
455 | $this->recurrenceMonthOfYear = $recurrenceMonthOfYear;
456 | }
457 |
458 | public function getRecurrenceStartDateOnly()
459 | {
460 | return $this->recurrenceStartDateOnly;
461 | }
462 |
463 | public function setRecurrenceStartDateOnly($recurrenceStartDateOnly)
464 | {
465 | $this->recurrenceStartDateOnly = $recurrenceStartDateOnly;
466 | }
467 |
468 | public function getRecurrenceTimeZoneSidKey()
469 | {
470 | return $this->recurrenceTimeZoneSidKey;
471 | }
472 |
473 | public function setRecurrenceTimeZoneSidKey($recurrenceTimeZoneSidKey)
474 | {
475 | $this->recurrenceTimeZoneSidKey = $recurrenceTimeZoneSidKey;
476 | }
477 |
478 | public function getRecurrenceType()
479 | {
480 | return $this->recurrenceType;
481 | }
482 |
483 | public function setRecurrenceType($recurrenceType)
484 | {
485 | $this->recurrenceType = $recurrenceType;
486 | }
487 |
488 | public function getRecurringTasks()
489 | {
490 | return $this->recurringTasks;
491 | }
492 |
493 | public function setRecurringTasks($recurringTasks)
494 | {
495 | $this->recurringTasks = $recurringTasks;
496 | }
497 |
498 | public function getReminderDateTime()
499 | {
500 | return $this->reminderDateTime;
501 | }
502 |
503 | public function setReminderDateTime(\DateTime $reminderDateTime)
504 | {
505 | $this->reminderDateTime = $reminderDateTime;
506 | }
507 |
508 | public function getStatus()
509 | {
510 | return $this->status;
511 | }
512 |
513 | public function setStatus($status)
514 | {
515 | $this->status = $status;
516 | }
517 |
518 | public function getSubject()
519 | {
520 | return $this->subject;
521 | }
522 |
523 | public function setSubject($subject)
524 | {
525 | $this->subject = $subject;
526 | }
527 |
528 | public function getTags()
529 | {
530 | return $this->tags;
531 | }
532 |
533 | public function setTags($tags)
534 | {
535 | $this->tags = $tags;
536 | }
537 |
538 | public function getWhat()
539 | {
540 | return $this->what;
541 | }
542 |
543 | public function setWhat($what)
544 | {
545 | $this->what = $what;
546 | $this->whatId = $what->getId();
547 | }
548 |
549 | public function getWhatId()
550 | {
551 | return $this->whatId;
552 | }
553 |
554 | public function setWhatId($whatId)
555 | {
556 | $this->whatId = $whatId;
557 | }
558 |
559 | public function getWho()
560 | {
561 | return $this->who;
562 | }
563 |
564 | public function setWho($who)
565 | {
566 | $this->who = $who;
567 | $this->whoId = $who->getId();
568 | }
569 |
570 | public function getWhoId()
571 | {
572 | return $this->whoId;
573 | }
574 |
575 | public function setWhoId($whoId)
576 | {
577 | $this->whoId = $whoId;
578 | }
579 | }
--------------------------------------------------------------------------------
/Model/Account.php:
--------------------------------------------------------------------------------
1 | accountContactRoles;
280 | }
281 |
282 | public function getAccountNumber()
283 | {
284 | return $this->accountNumber;
285 | }
286 |
287 | public function setAccountNumber($accountNumber)
288 | {
289 | $this->accountNumber = $accountNumber;
290 | }
291 |
292 | public function getAnnualRevenue()
293 | {
294 | return $this->annualRevenue;
295 | }
296 |
297 | public function setAnnualRevenue($annualRevenue)
298 | {
299 | $this->annualRevenue = $annualRevenue;
300 | }
301 |
302 | public function getBillingCity()
303 | {
304 | return $this->billingCity;
305 | }
306 |
307 | public function setBillingCity($billingCity)
308 | {
309 | $this->billingCity = $billingCity;
310 | }
311 |
312 | public function getBillingCountry()
313 | {
314 | return $this->billingCountry;
315 | }
316 |
317 | public function setBillingCountry($billingCountry)
318 | {
319 | $this->billingCountry = $billingCountry;
320 | }
321 |
322 | public function getBillingPostalCode()
323 | {
324 | return $this->billingPostalCode;
325 | }
326 |
327 | public function setBillingPostalCode($billingPostalCode)
328 | {
329 | $this->billingPostalCode = $billingPostalCode;
330 | }
331 |
332 | public function getBillingState()
333 | {
334 | return $this->billingState;
335 | }
336 |
337 | public function setBillingState($billingState)
338 | {
339 | $this->billingState = $billingState;
340 | }
341 |
342 | public function getBillingStreet()
343 | {
344 | return $this->billingStreet;
345 | }
346 |
347 | public function setBillingStreet($billingStreet)
348 | {
349 | $this->billingStreet = $billingStreet;
350 | }
351 |
352 | public function getContacts()
353 | {
354 | return $this->contacts;
355 | }
356 |
357 | public function setContacts($contacts)
358 | {
359 | $this->contacts = $contacts;
360 | }
361 |
362 | public function addContact($contact)
363 | {
364 | $contact->setAccount($this);
365 | $this->contacts[] = $contact;
366 | return $this;
367 | }
368 |
369 | public function getDescription()
370 | {
371 | return $this->description;
372 | }
373 |
374 | public function setDescription($description)
375 | {
376 | $this->description = $description;
377 | }
378 |
379 | public function getFax()
380 | {
381 | return $this->fax;
382 | }
383 |
384 | public function setFax($fax)
385 | {
386 | $this->fax = $fax;
387 | }
388 |
389 | public function getHistories()
390 | {
391 | return $this->histories;
392 | }
393 |
394 | public function setHistories($histories)
395 | {
396 | $this->histories = $histories;
397 | }
398 |
399 | public function getIndustry()
400 | {
401 | return $this->industry;
402 | }
403 |
404 | public function setIndustry($industry)
405 | {
406 | $this->industry = $industry;
407 | }
408 |
409 | public function isDeleted()
410 | {
411 | return $this->isDeleted;
412 | }
413 |
414 | public function getJigsaw()
415 | {
416 | return $this->jigsaw;
417 | }
418 |
419 | public function setJigsaw($jigsaw)
420 | {
421 | $this->jigsaw = $jigsaw;
422 | }
423 |
424 | public function getLastActivityDate()
425 | {
426 | return $this->lastActivityDate;
427 | }
428 |
429 | public function getMasterRecord()
430 | {
431 | return $this->masterRecord;
432 | }
433 |
434 | public function setMasterRecord($masterRecord)
435 | {
436 | $this->masterRecord = $masterRecord;
437 | }
438 |
439 | public function getMasterRecordId()
440 | {
441 | return $this->masterRecordId;
442 | }
443 |
444 | public function setMasterRecordId($masterRecordId)
445 | {
446 | $this->masterRecordId = $masterRecordId;
447 | }
448 |
449 | public function getName()
450 | {
451 | return $this->name;
452 | }
453 |
454 | public function setName($name)
455 | {
456 | $this->name = $name;
457 | }
458 |
459 | public function getNotes()
460 | {
461 | return $this->notes;
462 | }
463 |
464 | public function setNotes($notes)
465 | {
466 | $this->notes = $notes;
467 | }
468 |
469 | public function getNotesAndAttachments()
470 | {
471 | return $this->notesAndAttachments;
472 | }
473 |
474 | public function setNotesAndAttachments($notesAndAttachments)
475 | {
476 | $this->notesAndAttachments = $notesAndAttachments;
477 | }
478 |
479 | public function getNumberOfEmployees()
480 | {
481 | return $this->numberOfEmployees;
482 | }
483 |
484 | public function setNumberOfEmployees($numberOfEmployees)
485 | {
486 | $this->numberOfEmployees = $numberOfEmployees;
487 | }
488 |
489 | public function getOpenActivities()
490 | {
491 | return $this->openActivities;
492 | }
493 |
494 | public function setOpenActivities($openActivities)
495 | {
496 | $this->openActivities = $openActivities;
497 | }
498 |
499 | public function getOpportunities()
500 | {
501 | return $this->opportunities;
502 | }
503 |
504 | public function setOpportunities($opportunities)
505 | {
506 | $this->opportunities = $opportunities;
507 | }
508 |
509 | public function getOpportunityPartnersTo()
510 | {
511 | return $this->opportunityPartnersTo;
512 | }
513 |
514 | public function setOpportunityPartnersTo($opportunityPartnersTo)
515 | {
516 | $this->opportunityPartnersTo = $opportunityPartnersTo;
517 | }
518 |
519 | public function getOwner()
520 | {
521 | return $this->owner;
522 | }
523 |
524 | public function setOwner($owner)
525 | {
526 | $this->owner = $owner;
527 | $this->ownerId = $owner->getId();
528 | }
529 |
530 | public function getOwnerId()
531 | {
532 | return $this->ownerId;
533 | }
534 |
535 | public function setOwnerId($ownerId)
536 | {
537 | $this->ownerId = $ownerId;
538 | }
539 |
540 | public function getParent()
541 | {
542 | return $this->parent;
543 | }
544 |
545 | public function setParent($parent)
546 | {
547 | $this->parent = $parent;
548 | }
549 |
550 | public function getParentId()
551 | {
552 | return $this->parentId;
553 | }
554 |
555 | public function setParentId($parentId)
556 | {
557 | $this->parentId = $parentId;
558 | return $this;
559 | }
560 |
561 | public function getPartnersFrom()
562 | {
563 | return $this->partnersFrom;
564 | }
565 |
566 | public function setPartnersFrom($partnersFrom)
567 | {
568 | $this->partnersFrom = $partnersFrom;
569 | return $this;
570 | }
571 |
572 | public function getPartnersTo()
573 | {
574 | return $this->partnersTo;
575 | }
576 |
577 | public function setPartnersTo($partnersTo)
578 | {
579 | $this->partnersTo = $partnersTo;
580 | return $this;
581 | }
582 |
583 | public function getPhone()
584 | {
585 | return $this->phone;
586 | }
587 |
588 | public function setPhone($phone)
589 | {
590 | $this->phone = $phone;
591 | return $this;
592 | }
593 |
594 | public function getProcessInstances()
595 | {
596 | return $this->processInstances;
597 | }
598 |
599 | public function setProcessInstances($processInstances)
600 | {
601 | $this->processInstances = $processInstances;
602 | return $this;
603 | }
604 |
605 | public function getProcessSteps()
606 | {
607 | return $this->processSteps;
608 | }
609 |
610 | public function setProcessSteps($processSteps)
611 | {
612 | $this->processSteps = $processSteps;
613 | return $this;
614 | }
615 |
616 | public function getRecordType()
617 | {
618 | return $this->recordType;
619 | }
620 |
621 | public function setRecordType($recordType)
622 | {
623 | $this->recordType = $recordType;
624 | return $this;
625 | }
626 |
627 | public function getRecordTypeId()
628 | {
629 | return $this->recordTypeId;
630 | }
631 |
632 | public function setRecordTypeId($recordTypeId)
633 | {
634 | $this->recordTypeId = $recordTypeId;
635 | return $this;
636 | }
637 |
638 | public function getShares()
639 | {
640 | return $this->shares;
641 | }
642 |
643 | public function setShares($shares)
644 | {
645 | $this->shares = $shares;
646 | return $this;
647 | }
648 |
649 | public function getShippingCity()
650 | {
651 | return $this->shippingCity;
652 | }
653 |
654 | public function setShippingCity($shippingCity)
655 | {
656 | $this->shippingCity = $shippingCity;
657 | return $this;
658 | }
659 |
660 | public function getShippingCountry()
661 | {
662 | return $this->shippingCountry;
663 | }
664 |
665 | public function setShippingCountry($shippingCountry)
666 | {
667 | $this->shippingCountry = $shippingCountry;
668 | return $this;
669 | }
670 |
671 | public function getShippingPostalCode()
672 | {
673 | return $this->shippingPostalCode;
674 | }
675 |
676 | public function setShippingPostalCode($shippingPostalCode)
677 | {
678 | $this->shippingPostalCode = $shippingPostalCode;
679 | return $this;
680 | }
681 |
682 | public function getShippingState()
683 | {
684 | return $this->shippingState;
685 | }
686 |
687 | public function setShippingState($shippingState)
688 | {
689 | $this->shippingState = $shippingState;
690 | return $this;
691 | }
692 |
693 | public function getShippingStreet()
694 | {
695 | return $this->shippingStreet;
696 | }
697 |
698 | public function setShippingStreet($shippingStreet)
699 | {
700 | $this->shippingStreet = $shippingStreet;
701 | return $this;
702 | }
703 |
704 | public function getTags()
705 | {
706 | return $this->tags;
707 | }
708 |
709 | public function setTags($tags)
710 | {
711 | $this->tags = $tags;
712 | return $this;
713 | }
714 |
715 | public function getTasks()
716 | {
717 | return $this->tasks;
718 | }
719 |
720 | public function setTasks($tasks)
721 | {
722 | $this->tasks = $tasks;
723 | return $this;
724 | }
725 |
726 | public function getType()
727 | {
728 | return $this->type;
729 | }
730 |
731 | public function setType($type)
732 | {
733 | $this->type = $type;
734 | return $this;
735 | }
736 |
737 | public function getWebsite()
738 | {
739 | return $this->website;
740 | }
741 |
742 | public function setWebsite($website)
743 | {
744 | $this->website = $website;
745 | return $this;
746 | }
747 | }
--------------------------------------------------------------------------------
/Model/Opportunity.php:
--------------------------------------------------------------------------------
1 | account;
296 | }
297 |
298 | public function setAccount($account)
299 | {
300 | $this->account = $account;
301 | $this->accountId = $account->getId();
302 | return $this;
303 | }
304 |
305 | public function getAccountId()
306 | {
307 | return $this->accountId;
308 | }
309 |
310 | public function setAccountId($accountId)
311 | {
312 | $this->accountId = $accountId;
313 | return $this;
314 | }
315 |
316 | public function getAccountPartners()
317 | {
318 | return $this->accountPartners;
319 | }
320 |
321 | public function setAccountPartners($accountPartners)
322 | {
323 | $this->accountPartners = $accountPartners;
324 | return $this;
325 | }
326 |
327 | public function getActivityHistories()
328 | {
329 | return $this->activityHistories;
330 | }
331 |
332 | public function setActivityHistories($activityHistories)
333 | {
334 | $this->activityHistories = $activityHistories;
335 | return $this;
336 | }
337 |
338 | public function getAmount()
339 | {
340 | return $this->amount;
341 | }
342 |
343 | public function setAmount($amount)
344 | {
345 | $this->amount = $amount;
346 | return $this;
347 | }
348 |
349 | public function getAttachments()
350 | {
351 | return $this->attachments;
352 | }
353 |
354 | public function setAttachments($attachments)
355 | {
356 | $this->attachments = $attachments;
357 | return $this;
358 | }
359 |
360 | public function getCampaign()
361 | {
362 | return $this->campaign;
363 | }
364 |
365 | public function setCampaign($campaign)
366 | {
367 | $this->campaign = $campaign;
368 | return $this;
369 | }
370 |
371 | public function getCampaignId()
372 | {
373 | return $this->campaignId;
374 | }
375 |
376 | public function setCampaignId($campaignId)
377 | {
378 | $this->campaignId = $campaignId;
379 | return $this;
380 | }
381 |
382 | public function getCloseDate()
383 | {
384 | return $this->closeDate;
385 | }
386 |
387 | public function setCloseDate($closeDate)
388 | {
389 | $this->closeDate = $closeDate;
390 | return $this;
391 | }
392 |
393 | public function getDescription()
394 | {
395 | return $this->description;
396 | }
397 |
398 | public function setDescription($description)
399 | {
400 | $this->description = $description;
401 | return $this;
402 | }
403 |
404 | public function getEvents()
405 | {
406 | return $this->events;
407 | }
408 |
409 | public function setEvents($events)
410 | {
411 | $this->events = $events;
412 | return $this;
413 | }
414 |
415 | public function getFeedSubscriptionsForEntity()
416 | {
417 | return $this->feedSubscriptionsForEntity;
418 | }
419 |
420 | public function setFeedSubscriptionsForEntity($feedSubscriptionsForEntity)
421 | {
422 | $this->feedSubscriptionsForEntity = $feedSubscriptionsForEntity;
423 | return $this;
424 | }
425 |
426 | public function getFeeds()
427 | {
428 | return $this->feeds;
429 | }
430 |
431 | public function setFeeds($feeds)
432 | {
433 | $this->feeds = $feeds;
434 | return $this;
435 | }
436 |
437 | public function getFiscal()
438 | {
439 | return $this->fiscal;
440 | }
441 |
442 | public function setFiscal($fiscal)
443 | {
444 | $this->fiscal = $fiscal;
445 | return $this;
446 | }
447 |
448 | public function getFiscalQuarter()
449 | {
450 | return $this->fiscalQuarter;
451 | }
452 |
453 | public function setFiscalQuarter($fiscalQuarter)
454 | {
455 | $this->fiscalQuarter = $fiscalQuarter;
456 | return $this;
457 | }
458 |
459 | public function getFiscalYear()
460 | {
461 | return $this->fiscalYear;
462 | }
463 |
464 | public function getForecastCategory()
465 | {
466 | return $this->forecastCategory;
467 | }
468 |
469 | public function setForecastCategory($forecastCategory)
470 | {
471 | $this->forecastCategory = $forecastCategory;
472 | return $this;
473 | }
474 |
475 | public function getForecastCategoryName()
476 | {
477 | return $this->forecastCategoryName;
478 | }
479 |
480 | public function setForecastCategoryName($forecastCategoryName)
481 | {
482 | $this->forecastCategoryName = $forecastCategoryName;
483 | return $this;
484 | }
485 |
486 | public function getHasOpportunityLineItem()
487 | {
488 | return $this->hasOpportunityLineItem;
489 | }
490 |
491 | public function getHistories()
492 | {
493 | return $this->histories;
494 | }
495 |
496 | public function setHistories($histories)
497 | {
498 | $this->histories = $histories;
499 | return $this;
500 | }
501 |
502 | public function isClosed()
503 | {
504 | return $this->isClosed;
505 | }
506 |
507 | public function isDeleted()
508 | {
509 | return $this->isDeleted;
510 | }
511 |
512 | public function isWon()
513 | {
514 | return $this->isWon;
515 | }
516 |
517 | public function getLastActivityDate()
518 | {
519 | return $this->lastActivityDate;
520 | }
521 |
522 | public function setLastActivityDate($lastActivityDate)
523 | {
524 | $this->lastActivityDate = $lastActivityDate;
525 | return $this;
526 | }
527 |
528 | public function getLeadSource()
529 | {
530 | return $this->leadSource;
531 | }
532 |
533 | public function setLeadSource($leadSource)
534 | {
535 | $this->leadSource = $leadSource;
536 | return $this;
537 | }
538 |
539 | public function getName()
540 | {
541 | return $this->name;
542 | }
543 |
544 | public function setName($name)
545 | {
546 | $this->name = $name;
547 | return $this;
548 | }
549 |
550 | public function getNextStep()
551 | {
552 | return $this->nextStep;
553 | }
554 |
555 | public function setNextStep($nextStep)
556 | {
557 | $this->nextStep = $nextStep;
558 | return $this;
559 | }
560 |
561 | public function getNotes()
562 | {
563 | return $this->notes;
564 | }
565 |
566 | public function setNotes($notes)
567 | {
568 | $this->notes = $notes;
569 | return $this;
570 | }
571 |
572 | public function getNotesAndAttachments()
573 | {
574 | return $this->notesAndAttachments;
575 | }
576 |
577 | public function setNotesAndAttachments($notesAndAttachments)
578 | {
579 | $this->notesAndAttachments = $notesAndAttachments;
580 | return $this;
581 | }
582 |
583 | public function getOpenActivities()
584 | {
585 | return $this->openActivities;
586 | }
587 |
588 | public function setOpenActivities($openActivities)
589 | {
590 | $this->openActivities = $openActivities;
591 | return $this;
592 | }
593 |
594 | public function getOpportunityCompetitors()
595 | {
596 | return $this->opportunityCompetitors;
597 | }
598 |
599 | public function setOpportunityCompetitors($opportunityCompetitors)
600 | {
601 | $this->opportunityCompetitors = $opportunityCompetitors;
602 | return $this;
603 | }
604 |
605 | public function getOpportunityContactRoles()
606 | {
607 | return $this->opportunityContactRoles;
608 | }
609 |
610 | public function setOpportunityContactRoles($opportunityContactRoles)
611 | {
612 | $this->opportunityContactRoles = $opportunityContactRoles;
613 | return $this;
614 | }
615 |
616 | public function getOpportunityHistories()
617 | {
618 | return $this->opportunityHistories;
619 | }
620 |
621 | public function setOpportunityHistories($opportunityHistories)
622 | {
623 | $this->opportunityHistories = $opportunityHistories;
624 | return $this;
625 | }
626 |
627 | public function getOpportunityLineItems()
628 | {
629 | return $this->opportunityLineItems;
630 | }
631 |
632 | public function setOpportunityLineItems($opportunityLineItems)
633 | {
634 | $this->opportunityLineItems = $opportunityLineItems;
635 | return $this;
636 | }
637 |
638 | public function getOpportunityPartnersFrom()
639 | {
640 | return $this->opportunityPartnersFrom;
641 | }
642 |
643 | public function setOpportunityPartnersFrom($opportunityPartnersFrom)
644 | {
645 | $this->opportunityPartnersFrom = $opportunityPartnersFrom;
646 | return $this;
647 | }
648 |
649 | public function getOwner()
650 | {
651 | return $this->owner;
652 | }
653 |
654 | public function setOwner(User $owner)
655 | {
656 | $this->owner = $owner;
657 | $this->ownerId = $owner->getId();
658 | return $this;
659 | }
660 |
661 | public function getOwnerId()
662 | {
663 | return $this->ownerId;
664 | }
665 |
666 | public function setOwnerId($ownerId)
667 | {
668 | $this->ownerId = $ownerId;
669 | return $this;
670 | }
671 |
672 | public function getPartners()
673 | {
674 | return $this->partners;
675 | }
676 |
677 | public function setPartners($partners)
678 | {
679 | $this->partners = $partners;
680 | return $this;
681 | }
682 |
683 | public function getPricebook2()
684 | {
685 | return $this->pricebook2;
686 | }
687 |
688 | public function setPricebook2($pricebook2)
689 | {
690 | $this->pricebook2 = $pricebook2;
691 | return $this;
692 | }
693 |
694 | public function getPricebook2Id()
695 | {
696 | return $this->pricebook2Id;
697 | }
698 |
699 | public function setPricebook2Id($pricebook2Id)
700 | {
701 | $this->pricebook2Id = $pricebook2Id;
702 | return $this;
703 | }
704 |
705 | public function getProbability()
706 | {
707 | return $this->probability;
708 | }
709 |
710 | public function setProbability($probability)
711 | {
712 | $this->probability = $probability;
713 | return $this;
714 | }
715 |
716 | public function getProcessInstances()
717 | {
718 | return $this->processInstances;
719 | }
720 |
721 | public function setProcessInstances($processInstances)
722 | {
723 | $this->processInstances = $processInstances;
724 | return $this;
725 | }
726 |
727 | public function getProcessSteps()
728 | {
729 | return $this->processSteps;
730 | }
731 |
732 | public function setProcessSteps($processSteps)
733 | {
734 | $this->processSteps = $processSteps;
735 | return $this;
736 | }
737 |
738 | public function getRecordType()
739 | {
740 | return $this->recordType;
741 | }
742 |
743 | public function setRecordType($recordType)
744 | {
745 | $this->recordType = $recordType;
746 | return $this;
747 | }
748 |
749 | public function getRecordTypeId()
750 | {
751 | return $this->recordTypeId;
752 | }
753 |
754 | public function setRecordTypeId($recordTypeId)
755 | {
756 | $this->recordTypeId = $recordTypeId;
757 | return $this;
758 | }
759 |
760 | public function getShares()
761 | {
762 | return $this->shares;
763 | }
764 |
765 | public function setShares($shares)
766 | {
767 | $this->shares = $shares;
768 | return $this;
769 | }
770 |
771 | public function getStageName()
772 | {
773 | return $this->stageName;
774 | }
775 |
776 | public function setStageName($stageName)
777 | {
778 | $this->stageName = $stageName;
779 | return $this;
780 | }
781 |
782 | public function getTags()
783 | {
784 | return $this->tags;
785 | }
786 |
787 | public function setTags($tags)
788 | {
789 | $this->tags = $tags;
790 | return $this;
791 | }
792 |
793 | public function getTasks()
794 | {
795 | return $this->tasks;
796 | }
797 |
798 | public function setTasks($tasks)
799 | {
800 | $this->tasks = $tasks;
801 | return $this;
802 | }
803 |
804 | public function getType()
805 | {
806 | return $this->type;
807 | }
808 |
809 | public function setType($type)
810 | {
811 | $this->type = $type;
812 | return $this;
813 | }
814 | }
--------------------------------------------------------------------------------
/Model/User.php:
--------------------------------------------------------------------------------
1 | aboutMe;
374 | }
375 |
376 | public function setAboutMe($aboutMe)
377 | {
378 | $this->aboutMe = $aboutMe;
379 | }
380 |
381 | public function getAccounts()
382 | {
383 | return $this->accounts;
384 | }
385 |
386 | public function setAccounts($accounts)
387 | {
388 | $this->accounts = $accounts;
389 | }
390 |
391 | public function getCallCenterId()
392 | {
393 | return $this->callCenterId;
394 | }
395 |
396 | public function setCallCenterId($callCenterId)
397 | {
398 | $this->callCenterId = $callCenterId;
399 | }
400 |
401 | public function getCity()
402 | {
403 | return $this->city;
404 | }
405 |
406 | public function setCity($city)
407 | {
408 | $this->city = $city;
409 | }
410 |
411 | public function getCommunityNickname()
412 | {
413 | return $this->communityNickname;
414 | }
415 |
416 | public function setCommunityNickname($communityNickname)
417 | {
418 | $this->communityNickname = $communityNickname;
419 | }
420 |
421 | public function getCompanyName()
422 | {
423 | return $this->companyName;
424 | }
425 |
426 | public function setCompanyName($companyName)
427 | {
428 | $this->companyName = $companyName;
429 | }
430 |
431 | public function getContact()
432 | {
433 | return $this->contact;
434 | }
435 |
436 | public function setContact($contact)
437 | {
438 | $this->contact = $contact;
439 | }
440 |
441 | public function getContactId()
442 | {
443 | return $this->contactId;
444 | }
445 |
446 | public function setContactId($contactId)
447 | {
448 | $this->contactId = $contactId;
449 | }
450 |
451 | public function getContractsSigned()
452 | {
453 | return $this->contractsSigned;
454 | }
455 |
456 | public function setContractsSigned($contractsSigned)
457 | {
458 | $this->contractsSigned = $contractsSigned;
459 | }
460 |
461 | public function getCountry()
462 | {
463 | return $this->country;
464 | }
465 |
466 | public function setCountry($country)
467 | {
468 | $this->country = $country;
469 | }
470 |
471 | public function getDefaultGroupNotificationFrequency()
472 | {
473 | return $this->defaultGroupNotificationFrequency;
474 | }
475 |
476 | public function setDefaultGroupNotificationFrequency($defaultGroupNotificationFrequency)
477 | {
478 | $this->defaultGroupNotificationFrequency = $defaultGroupNotificationFrequency;
479 | }
480 |
481 | public function getDelegatedApproverId()
482 | {
483 | return $this->delegatedApproverId;
484 | }
485 |
486 | public function setDelegatedApproverId($delegatedApproverId)
487 | {
488 | $this->delegatedApproverId = $delegatedApproverId;
489 | }
490 |
491 | public function getDelegatedUsers()
492 | {
493 | return $this->delegatedUsers;
494 | }
495 |
496 | public function setDelegatedUsers($delegatedUsers)
497 | {
498 | $this->delegatedUsers = $delegatedUsers;
499 | }
500 |
501 | public function getDepartment()
502 | {
503 | return $this->department;
504 | }
505 |
506 | public function setDepartment($department)
507 | {
508 | $this->department = $department;
509 | }
510 |
511 | public function getDigestFrequency()
512 | {
513 | return $this->digestFrequency;
514 | }
515 |
516 | public function setDigestFrequency($digestFrequency)
517 | {
518 | $this->digestFrequency = $digestFrequency;
519 | }
520 |
521 | public function getDivision()
522 | {
523 | return $this->division;
524 | }
525 |
526 | public function setDivision($division)
527 | {
528 | $this->division = $division;
529 | }
530 |
531 | public function getEmail()
532 | {
533 | return $this->email;
534 | }
535 |
536 | public function setEmail($email)
537 | {
538 | $this->email = $email;
539 | }
540 |
541 | public function getEmailEncodingKey()
542 | {
543 | return $this->emailEncodingKey;
544 | }
545 |
546 | public function setEmailEncodingKey($emailEncodingKey)
547 | {
548 | $this->emailEncodingKey = $emailEncodingKey;
549 | }
550 |
551 | public function getEmployeeNumber()
552 | {
553 | return $this->employeeNumber;
554 | }
555 |
556 | public function setEmployeeNumber($employeeNumber)
557 | {
558 | $this->employeeNumber = $employeeNumber;
559 | }
560 |
561 | public function getExtension()
562 | {
563 | return $this->extension;
564 | }
565 |
566 | public function setExtension($extension)
567 | {
568 | $this->extension = $extension;
569 | }
570 |
571 | public function getFax()
572 | {
573 | return $this->fax;
574 | }
575 |
576 | public function setFax($fax)
577 | {
578 | $this->fax = $fax;
579 | }
580 |
581 | public function getFederationIdentifier()
582 | {
583 | return $this->federationIdentifier;
584 | }
585 |
586 | public function setFederationIdentifier($federationIdentifier)
587 | {
588 | $this->federationIdentifier = $federationIdentifier;
589 | }
590 |
591 | public function getFeedSubscriptions()
592 | {
593 | return $this->feedSubscriptions;
594 | }
595 |
596 | public function setFeedSubscriptions($feedSubscriptions)
597 | {
598 | $this->feedSubscriptions = $feedSubscriptions;
599 | }
600 |
601 | public function getFeedSubscriptionsForEntity()
602 | {
603 | return $this->feedSubscriptionsForEntity;
604 | }
605 |
606 | public function setFeedSubscriptionsForEntity($feedSubscriptionsForEntity)
607 | {
608 | $this->feedSubscriptionsForEntity = $feedSubscriptionsForEntity;
609 | }
610 |
611 | public function getFeeds()
612 | {
613 | return $this->feeds;
614 | }
615 |
616 | public function setFeeds($feeds)
617 | {
618 | $this->feeds = $feeds;
619 | }
620 |
621 | public function getForecastEnabled()
622 | {
623 | return $this->forecastEnabled;
624 | }
625 |
626 | public function setForecastEnabled($forecastEnabled)
627 | {
628 | $this->forecastEnabled = $forecastEnabled;
629 | }
630 |
631 | public function getFullPhotoUrl()
632 | {
633 | return $this->fullPhotoUrl;
634 | }
635 |
636 | public function setFullPhotoUrl($fullPhotoUrl)
637 | {
638 | $this->fullPhotoUrl = $fullPhotoUrl;
639 | }
640 |
641 | public function getAlias()
642 | {
643 | return $this->alias;
644 | }
645 |
646 | public function setAlias($alias)
647 | {
648 | $this->alias = $alias;
649 | }
650 |
651 | public function getFirstName()
652 | {
653 | return $this->firstName;
654 | }
655 |
656 | public function setFirstName($firstName)
657 | {
658 | $this->firstName = $firstName;
659 | }
660 |
661 | public function getIsActive()
662 | {
663 | return $this->isActive;
664 | }
665 |
666 | public function isActive()
667 | {
668 | return $this->isActive;
669 | }
670 |
671 | public function setIsActive($isActive)
672 | {
673 | $this->isActive = $isActive;
674 | }
675 |
676 | public function getLastName()
677 | {
678 | return $this->lastName;
679 | }
680 |
681 | public function setLastName($lastName)
682 | {
683 | $this->lastName = $lastName;
684 | }
685 |
686 | public function getName()
687 | {
688 | return $this->name;
689 | }
690 |
691 | public function setName($name)
692 | {
693 | $this->name = $name;
694 | }
695 |
696 | public function getPhone()
697 | {
698 | return $this->phone;
699 | }
700 |
701 | public function setPhone($phone)
702 | {
703 | $this->phone = $phone;
704 | }
705 |
706 | public function getTitle()
707 | {
708 | return $this->title;
709 | }
710 |
711 | public function setTitle($title)
712 | {
713 | $this->title = $title;
714 | }
715 |
716 | public function getLanguageLocaleKey()
717 | {
718 | return $this->languageLocaleKey;
719 | }
720 |
721 | public function setLanguageLocaleKey($languageLocaleKey)
722 | {
723 | $this->languageLocaleKey = $languageLocaleKey;
724 | }
725 |
726 | public function getLastLoginDate()
727 | {
728 | return $this->lastLoginDate;
729 | }
730 |
731 | public function getLastPasswordChangeDate()
732 | {
733 | return $this->lastPasswordChangeDate;
734 | }
735 |
736 | public function getLocaleSidKey()
737 | {
738 | return $this->localeSidKey;
739 | }
740 |
741 | public function setLocaleSidKey($localeSidKey)
742 | {
743 | $this->localeSidKey = $localeSidKey;
744 | }
745 |
746 | public function getManager()
747 | {
748 | return $this->manager;
749 | }
750 |
751 | public function setManager($manager)
752 | {
753 | $this->manager = $manager;
754 | }
755 |
756 | public function getManagerId()
757 | {
758 | return $this->managerId;
759 | }
760 |
761 | public function setManagerId($managerId)
762 | {
763 | $this->managerId = $managerId;
764 | }
765 |
766 | public function getMobilePhone()
767 | {
768 | return $this->mobilePhone;
769 | }
770 |
771 | public function setMobilePhone($mobilePhone)
772 | {
773 | $this->mobilePhone = $mobilePhone;
774 | }
775 |
776 | public function getOfflinePdaTrialExpirationDate()
777 | {
778 | return $this->offlinePdaTrialExpirationDate;
779 | }
780 |
781 | public function setOfflinePdaTrialExpirationDate($offlinePdaTrialExpirationDate)
782 | {
783 | $this->offlinePdaTrialExpirationDate = $offlinePdaTrialExpirationDate;
784 | }
785 |
786 | public function getOfflineTrialExpirationDate()
787 | {
788 | return $this->offlineTrialExpirationDate;
789 | }
790 |
791 | public function setOfflineTrialExpirationDate($offlineTrialExpirationDate)
792 | {
793 | $this->offlineTrialExpirationDate = $offlineTrialExpirationDate;
794 | }
795 |
796 | public function getPostalCode()
797 | {
798 | return $this->postalCode;
799 | }
800 |
801 | public function setPostalCode($postalCode)
802 | {
803 | $this->postalCode = $postalCode;
804 | }
805 |
806 | public function getReceivesAdminInfoEmails()
807 | {
808 | return $this->receivesAdminInfoEmails;
809 | }
810 |
811 | public function getReceivesInfoEmails()
812 | {
813 | return $this->receivesInfoEmails;
814 | }
815 |
816 | public function getSmallPhotoUrl()
817 | {
818 | return $this->smallPhotoUrl;
819 | }
820 |
821 | public function getState()
822 | {
823 | return $this->state;
824 | }
825 |
826 | public function setState($state)
827 | {
828 | $this->state = $state;
829 | }
830 |
831 | public function getStreet()
832 | {
833 | return $this->street;
834 | }
835 |
836 | public function setStreet($street)
837 | {
838 | $this->street = $street;
839 | }
840 |
841 | public function getTimeZoneSidKey()
842 | {
843 | return $this->timeZoneSidKey;
844 | }
845 |
846 | public function setTimeZoneSidKey($timeZoneSidKey)
847 | {
848 | $this->timeZoneSidKey = $timeZoneSidKey;
849 | }
850 |
851 | public function getUsername()
852 | {
853 | return $this->username;
854 | }
855 |
856 | public function setUsername($username)
857 | {
858 | $this->username = $username;
859 | }
860 |
861 | public function getUserPermissionsAvantgoUser()
862 | {
863 | return $this->userPermissionsAvantgoUser;
864 | }
865 |
866 | public function setUserPermissionsAvantgoUser($userPermissionsAvantgoUser)
867 | {
868 | $this->userPermissionsAvantgoUser = $userPermissionsAvantgoUser;
869 | }
870 |
871 | public function getUserPermissionsCallCenterAutoLogin()
872 | {
873 | return $this->userPermissionsCallCenterAutoLogin;
874 | }
875 |
876 | public function setUserPermissionsCallCenterAutoLogin($userPermissionsCallCenterAutoLogin)
877 | {
878 | $this->userPermissionsCallCenterAutoLogin = $userPermissionsCallCenterAutoLogin;
879 | }
880 |
881 | public function getUserPermissionsMarketingUser()
882 | {
883 | return $this->userPermissionsMarketingUser;
884 | }
885 |
886 | public function setUserPermissionsMarketingUser($userPermissionsMarketingUser)
887 | {
888 | $this->userPermissionsMarketingUser = $userPermissionsMarketingUser;
889 | }
890 |
891 | public function getUserPermissionsMobileUser()
892 | {
893 | return $this->userPermissionsMobileUser;
894 | }
895 |
896 | public function setUserPermissionsMobileUser($userPermissionsMobileUser)
897 | {
898 | $this->userPermissionsMobileUser = $userPermissionsMobileUser;
899 | }
900 |
901 | public function getUserPermissionsOfflineUser()
902 | {
903 | return $this->userPermissionsOfflineUser;
904 | }
905 |
906 | public function setUserPermissionsOfflineUser($userPermissionsOfflineUser)
907 | {
908 | $this->userPermissionsOfflineUser = $userPermissionsOfflineUser;
909 | }
910 |
911 | public function getUserPermissionsSFContentUser()
912 | {
913 | return $this->userPermissionsSFContentUser;
914 | }
915 |
916 | public function setUserPermissionsSFContentUser($userPermissionsSFContentUser)
917 | {
918 | $this->userPermissionsSFContentUser = $userPermissionsSFContentUser;
919 | }
920 |
921 | public function getUserPreferences()
922 | {
923 | return $this->userPreferences;
924 | }
925 |
926 | public function setUserPreferences($userPreferences)
927 | {
928 | $this->userPreferences = $userPreferences;
929 | }
930 |
931 | public function getUserPreferencesActivityRemindersPopup()
932 | {
933 | return $this->userPreferencesActivityRemindersPopup;
934 | }
935 |
936 | public function setUserPreferencesActivityRemindersPopup($userPreferencesActivityRemindersPopup)
937 | {
938 | $this->userPreferencesActivityRemindersPopup = $userPreferencesActivityRemindersPopup;
939 | }
940 |
941 | public function getUserPreferencesApexPagesDeveloperMode()
942 | {
943 | return $this->userPreferencesApexPagesDeveloperMode;
944 | }
945 |
946 | public function setUserPreferencesApexPagesDeveloperMode($userPreferencesApexPagesDeveloperMode)
947 | {
948 | $this->userPreferencesApexPagesDeveloperMode = $userPreferencesApexPagesDeveloperMode;
949 | }
950 |
951 | public function getUserPreferencesDisableAutoSubForFeeds()
952 | {
953 | return $this->userPreferencesDisableAutoSubForFeeds;
954 | }
955 |
956 | public function setUserPreferencesDisableAutoSubForFeeds($userPreferencesDisableAutoSubForFeeds)
957 | {
958 | $this->userPreferencesDisableAutoSubForFeeds = $userPreferencesDisableAutoSubForFeeds;
959 | }
960 |
961 | public function getUserPreferencesEventRemindersCheckboxDefault()
962 | {
963 | return $this->userPreferencesEventRemindersCheckboxDefault;
964 | }
965 |
966 | public function setUserPreferencesEventRemindersCheckboxDefault($userPreferencesEventRemindersCheckboxDefault)
967 | {
968 | $this->userPreferencesEventRemindersCheckboxDefault = $userPreferencesEventRemindersCheckboxDefault;
969 | }
970 |
971 | public function getUserPreferencesReminderSoundOff()
972 | {
973 | return $this->userPreferencesReminderSoundOff;
974 | }
975 |
976 | public function setUserPreferencesReminderSoundOff($userPreferencesReminderSoundOff)
977 | {
978 | $this->userPreferencesReminderSoundOff = $userPreferencesReminderSoundOff;
979 | }
980 |
981 | public function getUserPreferencesTaskRemindersCheckboxDefault()
982 | {
983 | return $this->userPreferencesTaskRemindersCheckboxDefault;
984 | }
985 |
986 | public function setUserPreferencesTaskRemindersCheckboxDefault($userPreferencesTaskRemindersCheckboxDefault)
987 | {
988 | $this->userPreferencesTaskRemindersCheckboxDefault = $userPreferencesTaskRemindersCheckboxDefault;
989 | }
990 |
991 | public function getUserType()
992 | {
993 | return $this->userType;
994 | }
995 | }
--------------------------------------------------------------------------------
/Model/Contact.php:
--------------------------------------------------------------------------------
1 | account;
380 | }
381 |
382 | public function setAccount(Account $account)
383 | {
384 | $this->account = $account;
385 | $this->accountId = $account->getId();
386 | }
387 |
388 | public function getAccountContactRoles()
389 | {
390 | return $this->accountContactRoles;
391 | }
392 |
393 | public function setAccountContactRoles($accountContactRoles)
394 | {
395 | $this->accountContactRoles = $accountContactRoles;
396 | }
397 |
398 | public function getAccountId()
399 | {
400 | return $this->accountId;
401 | }
402 |
403 | public function setAccountId($accountId)
404 | {
405 | $this->accountId = $accountId;
406 | }
407 |
408 | public function getActivityHistories()
409 | {
410 | return $this->activityHistories;
411 | }
412 |
413 | public function setActivityHistories($activityHistories)
414 | {
415 | $this->activityHistories = $activityHistories;
416 | }
417 |
418 | public function getAssets()
419 | {
420 | return $this->assets;
421 | }
422 |
423 | public function setAssets($assets)
424 | {
425 | $this->assets = $assets;
426 | }
427 |
428 | public function getAssistantName()
429 | {
430 | return $this->assistantName;
431 | }
432 |
433 | public function setAssistantName($assistantName)
434 | {
435 | $this->assistantName = $assistantName;
436 | }
437 |
438 | public function getAssistantPhone()
439 | {
440 | return $this->assistantPhone;
441 | }
442 |
443 | public function setAssistantPhone($assistantPhone)
444 | {
445 | $this->assistantPhone = $assistantPhone;
446 | }
447 |
448 | public function getAttachments()
449 | {
450 | return $this->attachments;
451 | }
452 |
453 | public function setAttachments($attachments)
454 | {
455 | $this->attachments = $attachments;
456 | }
457 |
458 | public function getBirthdate()
459 | {
460 | return $this->birthdate;
461 | }
462 |
463 | public function setBirthdate($birthdate)
464 | {
465 | $this->birthdate = $birthdate;
466 | }
467 |
468 | public function getCampaignMembers()
469 | {
470 | return $this->campaignMembers;
471 | }
472 |
473 | public function setCampaignMembers($campaignMembers)
474 | {
475 | $this->campaignMembers = $campaignMembers;
476 | }
477 |
478 | public function getCaseContactRoles()
479 | {
480 | return $this->caseContactRoles;
481 | }
482 |
483 | public function setCaseContactRoles($caseContactRoles)
484 | {
485 | $this->caseContactRoles = $caseContactRoles;
486 | }
487 |
488 | public function getCases()
489 | {
490 | return $this->cases;
491 | }
492 |
493 | public function setCases($cases)
494 | {
495 | $this->cases = $cases;
496 | }
497 |
498 | public function getContractContactRoles()
499 | {
500 | return $this->contractContactRoles;
501 | }
502 |
503 | public function setContractContactRoles($contractContactRoles)
504 | {
505 | $this->contractContactRoles = $contractContactRoles;
506 | }
507 |
508 | public function getContractsSigned()
509 | {
510 | return $this->contractsSigned;
511 | }
512 |
513 | public function setContractsSigned($contractsSigned)
514 | {
515 | $this->contractsSigned = $contractsSigned;
516 | }
517 |
518 | public function getDepartment()
519 | {
520 | return $this->department;
521 | }
522 |
523 | public function setDepartment($department)
524 | {
525 | $this->department = $department;
526 | }
527 |
528 | public function getDescription()
529 | {
530 | return $this->description;
531 | }
532 |
533 | public function setDescription($description)
534 | {
535 | $this->description = $description;
536 | }
537 |
538 | public function getEmail()
539 | {
540 | return $this->email;
541 | }
542 |
543 | public function setEmail($email)
544 | {
545 | $this->email = $email;
546 | }
547 |
548 | public function getEmailBouncedDate()
549 | {
550 | return $this->emailBouncedDate;
551 | }
552 |
553 | public function setEmailBouncedDate($emailBouncedDate)
554 | {
555 | $this->emailBouncedDate = $emailBouncedDate;
556 | }
557 |
558 | public function getEmailBouncedReason()
559 | {
560 | return $this->emailBouncedReason;
561 | }
562 |
563 | public function setEmailBouncedReason($emailBouncedReason)
564 | {
565 | $this->emailBouncedReason = $emailBouncedReason;
566 | }
567 |
568 | public function getEmailStatuses()
569 | {
570 | return $this->emailStatuses;
571 | }
572 |
573 | public function setEmailStatuses($emailStatuses)
574 | {
575 | $this->emailStatuses = $emailStatuses;
576 | }
577 |
578 | public function getEvents()
579 | {
580 | return $this->events;
581 | }
582 |
583 | public function setEvents($events)
584 | {
585 | $this->events = $events;
586 | }
587 |
588 | public function getFax()
589 | {
590 | return $this->fax;
591 | }
592 |
593 | public function setFax($fax)
594 | {
595 | $this->fax = $fax;
596 | }
597 |
598 | public function getFeedSubscriptionsForEntity()
599 | {
600 | return $this->feedSubscriptionsForEntity;
601 | }
602 |
603 | public function setFeedSubscriptionsForEntity($feedSubscriptionsForEntity)
604 | {
605 | $this->feedSubscriptionsForEntity = $feedSubscriptionsForEntity;
606 | }
607 |
608 | public function getFeeds()
609 | {
610 | return $this->feeds;
611 | }
612 |
613 | public function setFeeds($feeds)
614 | {
615 | $this->feeds = $feeds;
616 | }
617 |
618 | public function getFirstName()
619 | {
620 | return $this->firstName;
621 | }
622 |
623 | public function setFirstName($firstName)
624 | {
625 | $this->firstName = $firstName;
626 | }
627 |
628 | public function getHistories()
629 | {
630 | return $this->histories;
631 | }
632 |
633 | public function setHistories($histories)
634 | {
635 | $this->histories = $histories;
636 | }
637 |
638 | public function getHomePhone()
639 | {
640 | return $this->homePhone;
641 | }
642 |
643 | public function setHomePhone($homePhone)
644 | {
645 | $this->homePhone = $homePhone;
646 | }
647 |
648 | public function isDeleted()
649 | {
650 | return $this->isDeleted;
651 | }
652 |
653 | public function getJigsaw()
654 | {
655 | return $this->jigsaw;
656 | }
657 |
658 | public function setJigsaw($jigsaw)
659 | {
660 | $this->jigsaw = $jigsaw;
661 | }
662 |
663 | public function getLastActivityDate()
664 | {
665 | return $this->lastActivityDate;
666 | }
667 |
668 | public function getLastCURequestDate()
669 | {
670 | return $this->lastCURequestDate;
671 | }
672 |
673 | public function setLastCURequestDate($lastCURequestDate)
674 | {
675 | $this->lastCURequestDate = $lastCURequestDate;
676 | }
677 |
678 | public function getLastCUUpdateDate()
679 | {
680 | return $this->lastCUUpdateDate;
681 | }
682 |
683 | public function getLastName()
684 | {
685 | return $this->lastName;
686 | }
687 |
688 | public function setLastName($lastName)
689 | {
690 | $this->lastName = $lastName;
691 | }
692 |
693 | public function getLeadSource()
694 | {
695 | return $this->leadSource;
696 | }
697 |
698 | public function setLeadSource($leadSource)
699 | {
700 | $this->leadSource = $leadSource;
701 | }
702 |
703 | public function getMailingCity()
704 | {
705 | return $this->mailingCity;
706 | }
707 |
708 | public function setMailingCity($mailingCity)
709 | {
710 | $this->mailingCity = $mailingCity;
711 | }
712 |
713 | public function getMailingCountry()
714 | {
715 | return $this->mailingCountry;
716 | }
717 |
718 | public function setMailingCountry($mailingCountry)
719 | {
720 | $this->mailingCountry = $mailingCountry;
721 | }
722 |
723 | public function getMailingPostalCode()
724 | {
725 | return $this->mailingPostalCode;
726 | }
727 |
728 | public function setMailingPostalCode($mailingPostalCode)
729 | {
730 | $this->mailingPostalCode = $mailingPostalCode;
731 | }
732 |
733 | public function getMailingState()
734 | {
735 | return $this->mailingState;
736 | }
737 |
738 | public function setMailingState($mailingState)
739 | {
740 | $this->mailingState = $mailingState;
741 | }
742 |
743 | public function getMailingStreet()
744 | {
745 | return $this->mailingStreet;
746 | }
747 |
748 | public function setMailingStreet($mailingStreet)
749 | {
750 | $this->mailingStreet = $mailingStreet;
751 | }
752 |
753 | public function getMasterRecord()
754 | {
755 | return $this->masterRecord;
756 | }
757 |
758 | public function setMasterRecord($masterRecord)
759 | {
760 | $this->masterRecord = $masterRecord;
761 | }
762 |
763 | public function getMasterRecordId()
764 | {
765 | return $this->masterRecordId;
766 | }
767 |
768 | public function setMasterRecordId($masterRecordId)
769 | {
770 | $this->masterRecordId = $masterRecordId;
771 | }
772 |
773 | public function getMobilePhone()
774 | {
775 | return $this->mobilePhone;
776 | }
777 |
778 | public function setMobilePhone($mobilePhone)
779 | {
780 | $this->mobilePhone = $mobilePhone;
781 | }
782 |
783 | public function getName()
784 | {
785 | return $this->name;
786 | }
787 |
788 | public function getNotes()
789 | {
790 | return $this->notes;
791 | }
792 |
793 | public function setNotes($notes)
794 | {
795 | $this->notes = $notes;
796 | }
797 |
798 | public function getNotesAndAttachments()
799 | {
800 | return $this->notesAndAttachments;
801 | }
802 |
803 | public function setNotesAndAttachments($notesAndAttachments)
804 | {
805 | $this->notesAndAttachments = $notesAndAttachments;
806 | }
807 |
808 | public function getOpenActivities()
809 | {
810 | return $this->openActivities;
811 | }
812 |
813 | public function setOpenActivities($openActivities)
814 | {
815 | $this->openActivities = $openActivities;
816 | }
817 |
818 | public function getOpportunities()
819 | {
820 | return $this->opportunities;
821 | }
822 |
823 | public function setOpportunities($opportunities)
824 | {
825 | $this->opportunities = $opportunities;
826 | }
827 |
828 | public function getOpportunityContactRoles()
829 | {
830 | return $this->opportunityContactRoles;
831 | }
832 |
833 | public function setOpportunityContactRoles($opportunityContactRoles)
834 | {
835 | $this->opportunityContactRoles = $opportunityContactRoles;
836 | }
837 |
838 | public function getOtherCity()
839 | {
840 | return $this->otherCity;
841 | }
842 |
843 | public function setOtherCity($otherCity)
844 | {
845 | $this->otherCity = $otherCity;
846 | }
847 |
848 | public function getOtherCountry()
849 | {
850 | return $this->otherCountry;
851 | }
852 |
853 | public function setOtherCountry($otherCountry)
854 | {
855 | $this->otherCountry = $otherCountry;
856 | }
857 |
858 | public function getOtherPhone()
859 | {
860 | return $this->otherPhone;
861 | }
862 |
863 | public function setOtherPhone($otherPhone)
864 | {
865 | $this->otherPhone = $otherPhone;
866 | }
867 |
868 | public function getOtherPostalCode()
869 | {
870 | return $this->otherPostalCode;
871 | }
872 |
873 | public function setOtherPostalCode($otherPostalCode)
874 | {
875 | $this->otherPostalCode = $otherPostalCode;
876 | }
877 |
878 | public function getOtherState()
879 | {
880 | return $this->otherState;
881 | }
882 |
883 | public function setOtherState($otherState)
884 | {
885 | $this->otherState = $otherState;
886 | }
887 |
888 | public function getOtherStreet()
889 | {
890 | return $this->otherStreet;
891 | }
892 |
893 | public function setOtherStreet($otherStreet)
894 | {
895 | $this->otherStreet = $otherStreet;
896 | }
897 |
898 | public function getOwner()
899 | {
900 | return $this->owner;
901 | }
902 |
903 | public function setOwner($owner)
904 | {
905 | $this->owner = $owner;
906 | $this->ownerId = $owner->getId();
907 | }
908 |
909 | public function getOwnerId()
910 | {
911 | return $this->ownerId;
912 | }
913 |
914 | public function setOwnerId($ownerId)
915 | {
916 | $this->ownerId = $ownerId;
917 | }
918 |
919 | public function getPhone()
920 | {
921 | return $this->phone;
922 | }
923 |
924 | public function setPhone($phone)
925 | {
926 | $this->phone = $phone;
927 | }
928 |
929 | public function getProcessInstances()
930 | {
931 | return $this->processInstances;
932 | }
933 |
934 | public function setProcessInstances($processInstances)
935 | {
936 | $this->processInstances = $processInstances;
937 | }
938 |
939 | public function getProcessSteps()
940 | {
941 | return $this->processSteps;
942 | }
943 |
944 | public function setProcessSteps($processSteps)
945 | {
946 | $this->processSteps = $processSteps;
947 | }
948 |
949 | public function getReportsTo()
950 | {
951 | return $this->reportsTo;
952 | }
953 |
954 | public function setReportsTo($reportsTo)
955 | {
956 | $this->reportsTo = $reportsTo;
957 | }
958 |
959 | public function getReportsToId()
960 | {
961 | return $this->reportsToId;
962 | }
963 |
964 | public function setReportsToId($reportsToId)
965 | {
966 | $this->reportsToId = $reportsToId;
967 | }
968 |
969 | public function getSalutation()
970 | {
971 | return $this->salutation;
972 | }
973 |
974 | public function setSalutation($salutation)
975 | {
976 | $this->salutation = $salutation;
977 | }
978 |
979 | public function getShares()
980 | {
981 | return $this->shares;
982 | }
983 |
984 | public function setShares($shares)
985 | {
986 | $this->shares = $shares;
987 | }
988 |
989 | public function getTags()
990 | {
991 | return $this->tags;
992 | }
993 |
994 | public function setTags($tags)
995 | {
996 | $this->tags = $tags;
997 | }
998 |
999 | public function getTasks()
1000 | {
1001 | return $this->tasks;
1002 | }
1003 |
1004 | public function setTasks($tasks)
1005 | {
1006 | $this->tasks = $tasks;
1007 | }
1008 |
1009 | public function getTitle()
1010 | {
1011 | return $this->title;
1012 | }
1013 |
1014 | public function setTitle($title)
1015 | {
1016 | $this->title = $title;
1017 | }
1018 | }
--------------------------------------------------------------------------------