Exemplo n.º 1
0
 /**
  * @param Bronto_Api_Operation $operation
  * @param string $method
  * @param array originalData
  * @param array $requestFields
  */
 public function __construct(Bronto_Api_Operation $operation, $method, array $originalData = array(), array $requestFields = array())
 {
     parent::__construct(array('filter' => new Bronto_Api_Read_Filter($this, array('type' => 'OR'))));
     foreach ($originalData as $field => $value) {
         if ($field === 'filter') {
             $this->_data['filter']->replace($value);
         } else {
             $this->_set($field, $value);
         }
     }
     $this->_method = $method;
     $this->_operation = $operation;
     $this->_requestFields = $requestFields;
 }
Exemplo n.º 2
0
 /**
  * @param Bronto_Api_Operation $operation
  * @param string $method
  * @param int $limit
  * @param string $dynamicMethod
  * @param string $resolvedKey
  */
 public function __construct(Bronto_Api_Operation $operation, $method, $limit, $dynamicMethod, $resolvedKey)
 {
     parent::__construct();
     $this->_operation = $operation;
     $this->_method = $method;
     $this->_limit = $limit;
     $this->_resolvedKey = $resolvedKey;
     if ($method == $dynamicMethod) {
         $this->_acceptablePrefixes = array($method);
     } else {
         $this->_acceptablePrefixes = array($dynamicMethod, $dynamicMethod . $this->_operation->getTransferType(), $dynamicMethod . $this->_operation->getPluralizedType());
         if ($dynamicMethod == 'addOrUpdate') {
             foreach (array('add', 'update') as $write) {
                 $this->_acceptablePrefixes[] = $write;
                 $this->_acceptablePrefixes[] = $write . $this->_operation->getTransferType();
                 $this->_acceptablePrefixes[] = $write . $this->_operation->getPluralizedType();
             }
         }
     }
 }
Exemplo n.º 3
0
 /**
  * @see parent
  *
  * @param string $rawType
  * @param array $data
  */
 public function __construct($rawType, array $data = array())
 {
     parent::__construct($data);
     $this->_rawType = $rawType;
 }
Exemplo n.º 4
0
 /**
  * Create a options with a data array that overrides settings
  *
  * @param array $data
  */
 public function __construct(array $data = array())
 {
     parent::__construct($this->_mergeData(self::$defaultOptions, $data));
     $this->_init();
 }
Exemplo n.º 5
0
 /**
  * @see parent
  * @param Bronto_Api_Read $request
  * @param array $data
  */
 public function __construct($request, array $data = array())
 {
     parent::__construct($data);
     $this->_request = $request;
 }