Gets an exporter driver instance.

@param string      $type The type to get (yml, xml, etc.).
@param string|null $dest The directory where the exporter will export to.

@return Driver\AbstractExporter

@throws ExportException
559911
public function getExporter($type, $dest = null)
    {
        if ( ! isset(self::$_exporterDrivers[$type])) {
            throw ExportException::invalidExporterDriverType($type);
        }

        $class = self::$_exporterDrivers[$type];

        return new $class($dest);
    }
74906
public function transport($type = 'smtp')
    {
        if ($type == 'smtp') {
            return $this->getSmtpTransport();
        } elseif ($type == 'sendmail') {
            return $this->getSendMailTransport();
        }

        return $this->getMailTransport();
    }
249067
public static function getInstance($type, $init)
    {

        if (!self::$cachingInstance) {
            self::$cachingInstance = new DatabaseCache($type, $init);
        }

        return self::$cachingInstance;
    }
264353
public function getExporter()
	{
		// Derive the class name from the driver.
		$class = '\\Joomla\\Database\\' . ucfirst($this->name) . '\\' . ucfirst($this->name) . 'Exporter';

		// Make sure we have an exporter class for this driver.
		if (!class_exists($class))
		{
			// If it doesn't exist we are at an impasse so throw an exception.
			throw new \RuntimeException('Database Exporter not found.');
		}

		/* @var  $o  DatabaseExporter */
		$o = new $class;
		$o->setDbo($this);

		return $o;
	}
1070473
public function export($path, $dest)
    {
        $head = $this->getHead();
        $branch = $head->getName();

        $this->dispatch(VcsEvents::PRE_EXPORT, new ExportEventData($head, $path, $dest));

        if (!$this->hasCheckout) {
            $this->checkout();
        }

        // we already have cloned the repository, use that instead
        $result = $this->execute('clone', array('-b' => (string) $branch, '--depth=1', 'file://' . $this->cwd, $dest), getcwd());

        $result = $this->adapter->execute('submodule', array('update', '--init' => true, '--recursive' => true), $dest);

        $filesystem = new Filesystem();
        $filesystem->remove($dest . '/.git');

        $this->dispatch(VcsEvents::POST_EXPORT, new ExportEventData($head, $path, $dest));
    }
774642
protected function getDenormalizer($data, $type, $format)
    {
        foreach ($this->denormalizers as $denormalizer) {
            if ($denormalizer->supportsDenormalization($data, $type, $format)) {
                return $denormalizer;
            }
        }
        return null;
    }
116317
public static function getInstance($type, $init) 
    {

        if (!self::$cachingInstance) {
            self::$cachingInstance = new IDS_Caching_Session($type, $init);
        }

        return self::$cachingInstance;
    }
1282123
public function getImports($types = 0x000000) {
    $imports = clone $this->ownImports;
    
    // props
    foreach ($this->getProperties() as $property) {
      if ($property->getType() instanceof ObjectType && $property->getType()->hasClass()) {
        $imports->add(new GClass($property->getType()->getClassFQN())); // translate back to GClass (because this can be a simple ClassInterface - class)
      }
    }
    
    // methods
    foreach ($this->getMethods() as $method) {
      foreach ($method->getParameters() as $parameter) {
        if ($parameter->getType() instanceof ObjectType && $parameter->getType()->hasClass()) {
          $imports->add(new GClass($parameter->getType()->getClassFQN())); // translate back
        }
      }
    }
    
    if ($types & self::WITH_EXTENDS && $this->parentClass != NULL) {
      $imports->add($this->parentClass);
    }
    
    // interfaces
    if ($types & self::WITH_INTERFACE) {
      foreach ($this->getInterfaces() as $interface) {
        $imports->add($interface);
      }
    }
    
    return $imports;
  }
1262302
public function export($name, $type)
	{
		$model = Bauhaus::getInstance($name)
			->buildList()
			->buildFilters()
			->buildScopes();

		return $model->getExportBuilder()
			->export($type);
	}
628584
public function fetch($type = 'num')
    {
        $row = parent::fetch($type);
        if ($type == 'assoc' && is_array($row) && !empty($this->_driver->autoShortenedIdentifiers)) {
            //Need to preserve order of row results
            $translatedRow = [];
            foreach ($row as $key => $val) {
                if (array_key_exists($key, $this->_driver->autoShortenedIdentifiers)) {
                    $translatedRow[$this->_driver->autoShortenedIdentifiers[$key]] = $val;
                } else {
                    $translatedRow[$key] = $val;
                }
            }
            $row = $translatedRow;
        }
        return $row;
    }
216559
public function getAdapterByExt($ext)
    {
        if (null === $adapter = $this->determineWhichAdapterToUse('.'.$ext)) {
            throw new RendererException("Unable to find adapter for '.$ext'.", RendererException::SCRIPTFILE_ERROR);
        }

        return $adapter;
    }
377147
public function getConverterForType($type)
    {
        if (!$this->hasType($type)) {
            throw new ConverterException(
                sprintf(
                    "No converters associated with type '%s'. Handled types are {%s}.",
                    $type,
                    join(', ', $this->getTypes())
                )
            );
        }

        return $this->converters[$this->types[$type]];
    }
1156526
public function getExport($alias)
    {
        if (!array_key_exists($alias, $this->exports)) {
            throw new \RuntimeException("The export with alias $alias is not known.");
        }
        
        return $this->exports[$alias];
    }
528391
public function export( $data = null, $type = null, $delimiter = null ) {

		if ( ! empty( $data ) ) {
			$this->set_data( $data );
		}

		if ( ! empty( $type ) && in_array( $type, $this->types, true ) ) {
			$this->type = $type;
		}

		if ( ! empty( $delimiter ) ) {
			$this->delimiter = $delimiter;
		}

		if ( method_exists( $this, "build_{$this->type}" ) ) {
			call_user_func( array( $this, 'build_' . $this->type ) );
		}

		return $this->built;
	}
1021224
public function get($src, $dest){
		if ( $src = $this->checkFilePath($src) &&
            ftp_get($this->cn, $dest, $src, FTP_BINARY) ){
      return true;
		}
		return false;
	}
1311281
public function download($dest, $callback = null)
    {
        if ($this->isFolder()) {
            return $this->downloadFolder($dest, $callback);
        }

        return $this->downloadFile($dest, $callback);
    }
99449
public function get($type)
    {
        if (!isset($this->instances[$type])) {

            if (!isset($this->services[$type])) {
                if ($this->debug) {
                    trigger_error(sprintf("Widget type '%s' does not exist, returning a null implementation", $type), E_USER_ERROR);
                }
                // This primarily meant to display stuff, we should never WSOD
                // in the user's face, return a null object instead that will
                // UI operations smooth and error tolerant.
                return new NullWidget();
            }

            $this->instances[$type] = $this->container->get($this->services[$type]);
        }

        return $this->instances[$type];
    }