for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @copyright Copyright (c) Flipbox Digital Limited
* @license https://flipboxfactory.com/software/hubspot/license
* @link https://www.flipboxfactory.com/software/hubspot/
*/
namespace flipbox\hubspot\criteria;
use flipbox\hubspot\HubSpot;
use flipbox\hubspot\services\resources\CompanyContacts;
use flipbox\hubspot\transformers\collections\DynamicTransformerCollection;
use flipbox\hubspot\transformers\collections\TransformerCollectionInterface;
use flipbox\hubspot\transformers\DynamicModelSuccess;
* @author Flipbox Factory <[email protected]>
* @since 1.0.0
class CompanyContactsCriteria extends ObjectCriteria
{
* @inheritdoc
protected $transformer = [
'class' => DynamicTransformerCollection::class,
'handle' => CompanyContacts::HUBSPOT_RESOURCE,
'transformers' => [
TransformerCollectionInterface::SUCCESS_KEY => [
'class' => DynamicModelSuccess::class,
'resource' => CompanyContacts::HUBSPOT_RESOURCE
]
];
* @throws \yii\base\InvalidConfigException
public function fetch(array $config = [])
$this->prepare($config);
return HubSpot::getInstance()
->getResources()
->getCompanyContacts()
->read($this);
}