use Org\Shipsimu\Hub\Factory\Lists\Recipient\RecipientListFactory;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Lists\Listable;
+use Org\Mxchange\CoreFramework\Traits\Lists\ListableTrait;
/**
* A PackageRecipient discovery class
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
abstract class BaseRecipientDiscovery extends BaseNodeDiscovery implements DiscoverableRecipient {
- /**
- * Instance of the list
- */
- private $listInstance = NULL;
+ // Load traits
+ use ListableTrait;
/**
* Protected constructor
$this->setListInstance($listInstance);
}
- /**
- * Setter for the list instance
- *
- * @param $listInstance A list of Listable
- * @return void
- */
- protected final function setListInstance (Listable $listInstance) {
- $this->listInstance = $listInstance;
- }
-
- /**
- * Getter for the list instance
- *
- * @return $listInstance A list of Listable
- */
- protected final function getListInstance () {
- return $this->listInstance;
- }
-
/**
* "Getter" for recipient iterator
*
use Org\Mxchange\CoreFramework\Registry\Registerable;
use Org\Mxchange\CoreFramework\Socket\InvalidSocketException;
use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait;
+use Org\Mxchange\CoreFramework\Traits\Visitor\VisitorTrait;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
-use Org\Mxchange\CoreFramework\Visitor\Visitor;
// Import SPL stuff
use \BadMethodCallException;
class NetworkPackageHandler extends BaseHubHandler implements Deliverable, Receivable, Registerable, Visitable {
// Load traits
use CryptoTrait;
+ use VisitorTrait;
/**
* Package mask for compressing package data:
*/
private $compressorInstance = NULL;
- /**
- * Visitor handler instance
- */
- private $visitorInstance = NULL;
-
/**
* Protected constructor
*
return $this->compressorInstance;
}
- /**
- * Setter for visitor instance
- *
- * @param $visitorInstance A Visitor instance
- * @return void
- */
- protected final function setVisitorInstance (Visitor $visitorInstance) {
- $this->visitorInstance = $visitorInstance;
- }
-
- /**
- * Getter for visitor instance
- *
- * @return $visitorInstance A Visitor instance
- */
- protected final function getVisitorInstance () {
- return $this->visitorInstance;
- }
-
/**
* Initialize all stackers
*
use Org\Shipsimu\Hub\Task\BaseHubTask;
// Import framework stuff
-use Org\Mxchange\CoreFramework\Lists\Listable;
use Org\Mxchange\CoreFramework\Task\BaseTask;
use Org\Mxchange\CoreFramework\Task\Taskable;
+use Org\Mxchange\CoreFramework\Traits\Lists\ListableTrait;
use Org\Mxchange\CoreFramework\Visitor\Visitable;
use Org\Mxchange\CoreFramework\Visitor\Visitor;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class NodePingTask extends BaseHubTask implements Taskable, Visitable {
- /**
- * Instance of the list
- */
- private $listInstance = NULL;
+ // Load traits
+ use ListableTrait;
/**
* Protected constructor
return $taskInstance;
}
- /**
- * Setter for the list instance
- *
- * @param $listInstance A list of Listable
- * @return void
- */
- protected final function setListInstance (Listable $listInstance) {
- $this->listInstance = $listInstance;
- }
-
- /**
- * Getter for the list instance
- *
- * @return $listInstance A list of Listable
- */
- protected final function getListInstance () {
- return $this->listInstance;
- }
-
/**
* Accepts the visitor to process the visitor
*
-Subproject commit c30da7e118a91b814adb6e997a1e4a39d0f1cba4
+Subproject commit 575accd328d27eccb2bf3caddb564b291e0780df