public function __construct(ymcPipe $pipe, $name = '', ymcPipeNodeConfiguration $config = null) { $this->pipe = $pipe; $this->name = $name; $configurationClass = $this->getConfigurationClass(); $pipe->addNode($this); if (NULL !== $configurationClass) { if (NULL !== $config) { $this->config = $config; if (!$this->config instanceof $configurationClass) { throw new ymcPipeNodeException(sprintf('Configuration Object given to constructor of %s must be an instance of %s. Given Class is %s.', get_class($this), $configurationClass, get_class($config))); } } else { $this->config = new $configurationClass(); if (!$this->config instanceof ymcPipeNodeConfiguration) { throw new ymcPipeNodeException('Return Value of ' . get_class($this) . '->getConfigurationObject() is not an instanceof ymcPipeNodeConfiguration'); } } } $this->inNodes = new ymcPipeNodeList(); $this->outNodes = new ymcPipeNodeList(); }