Skip to content

Commit

Permalink
Allow re-use of StructuredFile data endpoints with external filters (#…
Browse files Browse the repository at this point in the history
…944)

Allow re-use of StructuredFile data endpoints with external filters
  • Loading branch information
smgallo authored May 24, 2019
2 parents e47b8bf + 5f82161 commit 88a22ad
Show file tree
Hide file tree
Showing 20 changed files with 651 additions and 753 deletions.
2 changes: 1 addition & 1 deletion classes/ETL/Configuration/EtlConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ private function addDataEndpoint(stdClass &$config)
// Register the key with the configuration
$config->key = $endpointKey;

return $endpoint;
return $this->endpoints[$endpointKey];

} // addDataEndpoint()

Expand Down
23 changes: 10 additions & 13 deletions classes/ETL/DataEndpoint/DataEndpointOptions.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<?php
/* ==========================================================================================
/**
* Options (with defaults) supported by all data endpoints. Options specifically defined in this
* class are available and may have verification performed when they are set. Additional options
* may be added if defined in the configuration, but it will be up the the individual endpoint types
* whether or not to use them. We use an array along with the __set() magic method for optimum
* flexibility.
*
* @author Steve Gallo <[email protected]>
* @date 2015-10-15
*
* @see aOptions
* ==========================================================================================
*/

namespace ETL\DataEndpoint;
Expand All @@ -21,11 +17,10 @@
class DataEndpointOptions extends aOptions
{

/* ------------------------------------------------------------------------------------------
* Constructor. Optionally initialize the options using key/value pairs from an associative array
/**
* Optionally initialize the options using key/value pairs from an associative array
*
* @param $options An optional associative array used to initialize the values of this object
* ------------------------------------------------------------------------------------------
*/

public function __construct(array $options = null)
Expand Down Expand Up @@ -58,11 +53,13 @@ public function __construct(array $options = null)

parent::__construct($options);

} // __construct()
}

/* ------------------------------------------------------------------------------------------
/**
* Generic setter method for properties not otherwise covered.
* ------------------------------------------------------------------------------------------
*
* @param string $property The property being set.
* @param mixed $value The value of the property being set.
*/

public function __set($property, $value)
Expand All @@ -86,5 +83,5 @@ public function __set($property, $value)

$this->options[$property] = $value;
return $this;
} // __set()
} // class DataEndpointOptions
}
}
Loading

0 comments on commit 88a22ad

Please sign in to comment.