String collection

@param string $pipelineName which pipeline you want the collection for

@return string collection name
979476
public function getCollection($pipelineName = null)
    {
        if (!is_array($this->collection)) {
            return $this->collection;
        }

        if ($pipelineName == null) {
            throw new \LogicException(
                'If you specify multiple collections in your analytics definition, ' .
                'you must define multiple pipelines and vice versa and name them the same.'
            );
        }

        if (!isset($this->collection[$pipelineName])) {
            throw new \LogicException(
                'No collection defined for pipeline ' . $pipelineName . '. ' .
                'If all pipelines share the same collection, define "collection" attribute as string.'
            );
        }

        return $this->collection[$pipelineName];
    }
1336664
protected function getGalleryTemplateName(): string
    {
        $templateName = 'bs_gallery_default';

        // Use a custom template
        if (TL_MODE == 'FE' && $this->get('galleryTpl') != '') {
            return (string) $this->get('galleryTpl');
        }

        return $templateName;
    }
1038966
public function getQueueAliasByQueueName(string $queueName): string
    {
        return is_array($this->queues)
            ? ((array_flip($this->queues)[$queueName]) ?? $queueName)
            : $queueName;
    }
761813
public function getCollection($collectionName, array $options = []): Collection
    {
        $cacheKey = $collectionName.$this->getCollectionOptionsHash($options);
        if (!array_key_exists($cacheKey, $this->collectionsCache)) {
            $this->collectionsCache[$cacheKey] = $this->database->selectCollection(
                $collectionName,
                $options
            );
        }

        return $this->collectionsCache[$cacheKey];
    }
282047
function getFirstName($displayname=null) {
        if ( $displayname === null ) $displayname = $this->getNameAndEmail();
        if ( $displayname === null ) return null;
        $pieces = explode(' ',$displayname);
        if ( count($pieces) > 0 ) return $pieces[0];
        return null;
    }
769494
public function getTransitionsByName($transitionName)
    {
        return array_filter(
            $this->transitions,
            function (Transition $transition) use ($transitionName) {
                return $transition->getName() === $transitionName;
            }
        );
    }
438353
protected function getTable(StreamName $streamName)
    {
        if (isset($this->streamTableMap[$streamName->toString()])) {
            $tableName = $this->streamTableMap[$streamName->toString()];
        } else {
            $tableName = strtolower($this->getShortStreamName($streamName));

            if (strpos($tableName, "_stream") === false) {
                $tableName.= "_stream";
            }
        }

        return $tableName;
    }
316590
public GetPipelineResponse getPipeline(String pipelineName) {
        GetPipelineRequest request = new GetPipelineRequest();
        request.setPipelineName(pipelineName);
        return getPipeline(request);
    }
799399
protected function resolvePrimaryIdByPipeline(array $pipeline) {
		foreach ($pipeline as $stage) {
			foreach ($stage as $name => $definition) {
				if ($name === '$group' && isset($definition['_id'])) {
					return ltrim($definition['_id'], '$');
				}
			}
		}
	}
348378
private function _collection($collection) {
    return (!is_array($collection) && !is_object($collection)) ? str_split((string) $collection) : $collection;
  }
1201677
public function getTaxonomyForQName( $qname )
	{
		$prefix = $qname instanceof \QName
			? $qname->localName
			: strstr( $qname, ":", true );
		return $this->getTaxonomyForPrefix( $prefix );
	}
163605
public function aggregate($source, $pipeline, $options = [])
    {
        if ($pos = strpos($source, '.')) {
            $db = substr($source, 0, $pos);
            $collection = substr($source, $pos + 1);
        } else {
            $db = $this->_default_db;
            $collection = $source;
        }

        try {
            $command = ['aggregate' => $collection, 'pipeline' => $pipeline];
            if ($options) {
                $command = array_merge($command, $options);
            }
            if (!isset($command['cursor'])) {
                $command['cursor'] = ['batchSize' => 1000];
            }
            return $this->command($command, $db);
        } catch (RuntimeException $e) {
            throw new MongodbException([
                '`:aggregate` aggregate for `:collection` collection failed: :msg',
                'aggregate' => json_encode($pipeline),
                'collection' => $source,
                'msg' => $e->getMessage()
            ]);
        }
    }
401469
public function through(array $pipes, string $method = null) : PipelineInterface
    {
        $this->pipes = $pipes;
        $this->method = !is_null($method) ? $method : $this->defaultMethod;

        return $this;
    }
1005799
public function getCollection()
    {
        if (! isset($this->collection)) {
            return str_replace(
                '\\', '', Str::snake(Str::plural(class_basename($this)))
            );
        }

        return $this->collection;
    }
272926
public function mapEngineName(?string $engineName): ?string
    {
        if (null === $engineName) {
            return null;
        }

        switch (mb_strtolower($engineName)) {
            case '':
            case 'unknown':
            case 'other':
                $engineName = null;
                break;
            default:
                // nothing to do here
                break;
        }

        return $engineName;
    }
635670
protected function filename($connectionName)
    {
        $directory = $this->argument('directory');

        if (! empty($directory) &&
            ! is_dir(storage_path($directory))
        ) {
            $dirLoop = '';
            foreach(explode('/', $directory) as $dir) {
                if (! is_dir(storage_path($dirLoop . $dir))) {
                    mkdir(storage_path($dirLoop . $dir));
                }
                $dirLoop .= $dir . DIRECTORY_SEPARATOR;
            }

        }

        $filename = str_slug($connectionName) . '-' . Carbon::now()->format('Y-m-d-H-i-s') . '.sql';

        return storage_path($directory . DIRECTORY_SEPARATOR . $filename);
    }
729144
public function findChildByRouteName($routeName)
    {
        if ($this->hasChildren()) {
            if (array_key_exists($routeName, $this->children)) {
                return $this->children[$routeName];
            }
            /** @var RouteDefinition $definition */
            foreach ($this->children as $definition) {
                if (null !== $child = $definition->findChildByRouteName($routeName)) {
                    return $child;
                }
            }
        }
        return null;
    }