public function getSource($sourceName = null) {
		if ($sourceName === 'default') {
			$sourceName = null;
		}

		foreach ($this->sources as $key => $item) {
			if ((!$sourceName || $sourceName === $key)) {
				return $item;
			}

			$source = $item !== $this ? $item->getSource($sourceName) : null;

			if ($source) {
				return $source;
			}
		}

		if ($sourceName) {
			return null;
		}

		return $this;
	}
public function getSource($sourceName = null) {
		if ($sourceName === 'default') {
			$sourceName = null;
		}

		foreach ($this->sources as $key => $item) {
			if ((!$sourceName || $sourceName === $key)) {
				return $item;
			}

			$source = $item !== $this ? $item->getSource($sourceName) : null;

			if ($source) {
				return $source;
			}
		}

		if ($sourceName) {
			return null;
		}

		return $this;
	}
public function getSource ( $ sourceName = null ) { if ( $ sourceName === 'default' ) { $ sourceName = null ; } foreach ( $ this -> sources as $ key => $ item ) { if ( ( ! $ sourceName || $ sourceName === $ key ) ) { return $ item ; } $ source = $ item !== $ this ? $ item -> getSource ( $ sourceName ) : null ; if ( $ source ) { return $ source ; } } if ( $ sourceName ) { return null ; } return $ this ; }
Get source by name

@param string  $sourceName

@return \Jodit\Config | null
Get source by name