public function createLdapObject($type = null) { $creator = new LdapObjectCreator($this->getConnection(), $this->getSchemaFactory(), $this->config->getEventDispatcher()); if ($type) { $creator->create($type); } return $creator; }