@param string $extractName

@throws ContainerExceptionInterface
@throws NotFoundExceptionInterface

@return DataExtensionInterface
171076
private function getDataExtension(string $extractName): DataExtensionInterface
    {
        return $this->dataExtensions->has($extractName) ? $this->dataExtensions->get($extractName) : $this->dataExtension;
    }
308836
public function extractData($input, $index)
    {
        if (isset($input[$index])) {
            $this->setData($index, $input[$index]);
        }

        return $this;
    }
1190942
public function addExtractor(ExtractorInterface $extractor): self
    {
        $this->extractors[$extractor->name()] = $extractor;

        return $this;
    }
20938
public function getContainerExtension(): ?ExtensionInterface
    {
        if (null === $this->extension) {
            $extension = $this->createContainerExtension();

            if (null !== $extension) {
                if (!$extension instanceof ExtensionInterface) {
                    throw new \LogicException(sprintf('Extension %s must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface.',
                        \get_class($extension)));
                }

                // check naming convention
                $basename      = str_replace(['Component', 'Module', 'Plugin'], ['', '', ''], $this->getIdentifier());
                $expectedAlias = Container::underscore($basename);

                if ($expectedAlias != $extension->getAlias()) {
                    throw new \LogicException(sprintf('Users will expect the alias of the default extension of a bundle to be the underscored version of the bundle name ("%s"). You can override "Bundle::getContainerExtension()" if you want to use "%s" or another alias.',
                        $expectedAlias, $extension->getAlias()));
                }

                $this->extension = $extension;
            }
        }

        return $this->extension;
    }
770833
public function getBlobAsFile($container = '', $name = '', $localFileName = null)
    {
        $this->checkConnection();
        try {
            /** @var Container $container */
            $container = $this->blobConn->getContainer($container);
            if (empty($container)) {
                throw new \Exception("No container named '$container'");
            }

            $obj = $container->DataObject($name);

            if (!$obj->SaveToFilename($localFileName)) {
                throw new \Exception('');
            }
        } catch (\Exception $ex) {
            static::handleGuzzleException($ex);
            throw new DfException("Failed to retrieve blob '$name': " . $ex->getMessage());
        }
    }
691323
public function dirtyExit($tokenName)
    {
        if (!isset($this->dirtyExitRecovery[$tokenName])) {
            throw new Exception('No dirty exit recovery data for '. $tokenName);
            $this->cleanExit = true;
            return;
        }
        $this->exitState = $tokenName;
        $this->interrupt = true;
        $this->cleanExit = false;
    }
680729
public static function make(string $interfaceName)
    {
        if (self::$container === null) {
            throw new \Exception("Undefined DI Container");
        }

        try {
            return self::$container->get($interfaceName);
        } catch (\Exception $ex) {
            echo "Unable to find Interface inside container " . $ex->getMessage();
        }
    }
37604
public function resource(string $resourceName): Repository
    {
        if ($resource = $this->resources->get($resourceName)) {
            return ResourceCollection::makeResourceRepository($resource);
        }

        throw new Exception("Invalid api resource repository '{$resourceName}'");
    }
1216330
public function create($contentOrName, $type = null, array $data = [])
    {
        // Check if container or name is defined
        if (!(
            $contentOrName instanceof Model\ContentInterface ||
            (is_string($contentOrName) && 0 < strlen($contentOrName))
        )
        ) {
            throw new InvalidOperationException("Excepted instance of ContentInterface or string.");
        }

        // Default type if null
        if (null === $type) {
            $type = $this->defaultType;
        }

        // New instance
        $container = $this->editor->getRepository()->createContainer();
        $container->setType($type);

        // Plugin creation
        $plugin = $this->editor->getContainerPlugin($type);
        $plugin->create($container, $data);

        // Create default row
        if (!$plugin instanceof CopyPlugin) {
            $this->editor->getRowManager()->create($container);
        }

        // Add to container if available
        if ($contentOrName instanceof Model\ContentInterface) {
            $count = $contentOrName->getContainers()->count();
            $container->setPosition($count);
            $contentOrName->addContainer($container);
        } else {
            $container->setName($contentOrName);
        }

        return $container;
    }
625586
public function subtreeRange($parentName) {
    if ('' === $parentName) {
      // Return the full axis as a range.
      return $this;
    }
    if (!isset($this->subtreeLeafMap[$parentName])) {
      throw new \Exception("Unknown name: " . var_export($parentName, true));
    }
    $iBegin = reset($this->subtreeLeafMap[$parentName]);
    $iEnd = $iBegin + count($this->subtreeLeafMap[$parentName]);
    return new Range($iBegin, $iEnd, $parentName, $this);
  }
1109113
private function loadPropertyInfoExtractor($entityManagerName, ContainerBuilder $container)
    {
        $propertyExtractorDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.property_info_extractor', $entityManagerName), DoctrineExtractor::class);
        if (property_exists(DoctrineExtractor::class, 'entityManager')) {
            $argumentId = sprintf('doctrine.orm.%s_entity_manager', $entityManagerName);
        } else {
            $argumentId = sprintf('doctrine.orm.%s_entity_manager.metadata_factory', $entityManagerName);

            $metadataFactoryDefinition = $container->register($argumentId, ClassMetadataFactory::class);
            $metadataFactoryDefinition->setFactory([
                new Reference(sprintf('doctrine.orm.%s_entity_manager', $entityManagerName)),
                'getMetadataFactory',
            ]);
            $metadataFactoryDefinition->setPublic(false);
        }

        $propertyExtractorDefinition->addArgument(new Reference($argumentId));

        $propertyExtractorDefinition->addTag('property_info.list_extractor', ['priority' => -1001]);
        $propertyExtractorDefinition->addTag('property_info.type_extractor', ['priority' => -999]);
    }
1232643
public function extract($name, $separator = '.')
    {
        $filter = $this->filter instanceof NullFilter ? null : $this->filter;

        return new static($this->get($name, [], 'raw', $separator), $filter);
    }
1132058
public function extract(array $data)
    {
        if (!array_key_exists('class', $data)) {
            throw new \RuntimeException('Unable to extract class name from data');
        }

        if (!array_key_exists('data', $data)) {
            throw new \RuntimeException('Unable to extract message body from data');
        }

        if (!is_array($data['data'])) {
            throw new \RuntimeException('Message body from data must be an array');
        }

        if (!class_exists($data['class'])) {
            throw new \RuntimeException(sprintf('Class %s does\'nt exist', $data['class']));
        }

        if (!in_array(MessageInterface::class, class_implements($data['class']))) {
            throw new \RuntimeException(sprintf('Class must implement %s', MessageInterface::class));
        }

        $message = new $data['class'];

        if (is_subclass_of($data['class'], MessageAwareInterface::class)) {
            $message->setMessage($this->extract($data['data']));

            unset($data['data']['class']);
            unset($data['data']['data']);
        }

        return $this->getHydrator()->hydrate($message, $data['data']);
    }
1267931
public function extract($source, $target, ExtractionContextInterface $extractionContext)
    {
        if (!$this->canExtract($source, $target, $extractionContext)) {
            throw new ExtractionImpossibleException();
        }


        $metaData = $this->managerRegistry->getManagerForClass($source->name)->getClassMetadata($source->name);
        if (!$metaData instanceof ClassMetadata) {
            return;
        }

        if ($metaData->isInheritanceTypeNone()) {
            return;
        }

        $swagger = $extractionContext->getSwagger();

        if ($metaData->isRootEntity()) {
            $target->discriminator = $metaData->discriminatorColumn['name'];
            $target->required[] = $target->discriminator;
            foreach ($metaData->discriminatorMap as $key => $class) {
                $schema = new Schema();
                $swagger->extract($class, $schema, $extractionContext);
            }
            $target->properties[$metaData->discriminatorColumn['name']] = $property = new Schema();
            $property->type = 'string';
            $property->description = 'The concrete class of the inheritance.';
            $property->enum = array_keys($metaData->discriminatorMap);
        } else {
            if(isset($target->properties[$metaData->discriminatorColumn['name']])) {
                $property = $target->properties[$metaData->discriminatorColumn['name']];
                $property->description = 'Discriminator property. Value will be ';
                $property->type = 'string';
                $property->enum = [$metaData->discriminatorValue];
            }
        }
    }
846992
function get( $name )
	{
		if( $this->_container->locateName( $name ) === false )
		{
			$msg = 'No content object "%1$s" available in "%2$s"';
			throw new MW_Container_Exception( sprintf( $msg, $name, $this->_container->filename ) );
		}

		// $this->_container->getStream( $name ) doesn't work correctly because the stream can't be rewinded
		return new $this->_classname( 'zip://' . $this->_resourcepath . '#' . $name, $name );
	}
1272421
public function blobExists($container = '', $name = '')
    {
        $this->checkConnection();
        try {
            /** @var Container $container */
            $container = $this->blobConn->getContainer($container);
            if (empty($container)) {
                throw new \Exception("No container named '$container'");
            }

            $obj = $container->DataObject($name);

            return !empty($obj);
        } catch (\Exception $ex) {
        }

        return false;
    }
266074
protected function _extract( $filename, array &$options )
	{
		$matches = $result = array();

		if( ( $text = file_get_contents( $filename ) ) === false ) {
			throw new BuildException( sprintf( 'Unable to get file content from "%1$s"', $filename ) );
		}

		if( preg_match_all( '#/\*\*[\t ]+([a-zA-Z0-9/\-_]+)[\t ]*$.*\*/#smuU', $text, $matches ) === false ) {
			throw new BuildException( 'Invalid extract pattern' );
		}

		foreach( (array) $matches[1] as $pos => $key )
		{
			if( ( $list = preg_split( '/$/smu', $matches[0][$pos], -1, PREG_SPLIT_NO_EMPTY ) ) === false ) {
				throw new BuildException( 'Invalid split pattern' );
			}

			if( ( $list = preg_replace( '#^[^*/]*\*[\t ]?#u', '', $list ) ) === false ) {
				throw new BuildException( 'Invalid replace pattern' );
			}

			$num = 0;
			$desc = array();

			foreach( $list as $line )
			{
				if( $line === '' ) {
					$num++;
				} else if( $line[0] === '/' ) {
					continue;
				} else if( strncmp( '@see', $line, 4 ) === 0 ) {
					$options[$key]['see'][] = trim( substr( $line, 4 ) );
				} else if( strncmp( '@param', $line, 6 ) === 0 ) {
					$options[$key]['param'] = trim( substr( $line, 6 ) );
				} else if( strncmp( '@since', $line, 6 ) === 0 ) {
					$options[$key]['since'][] = trim( substr( $line, 6 ) );
				} else if( strncmp( '@category', $line, 9 ) === 0 ) {
					$options[$key]['category'][] = trim( substr( $line, 9 ) );
				} else if( strncmp( '@deprecated', $line, 11 ) === 0 ) {
					$options[$key]['deprecated'] = trim( substr( $line, 11 ) );
				} else if( !isset( $desc[$num] ) ) {
					$desc[$num] = $line . "\n";
				} else {
					$desc[$num] .= $line . "\n";
				}
			}

			if( isset( $desc[0] ) )
			{
				$options[$key]['short'] = str_replace( '\\/', '/', $desc[0] );
				unset( $desc[0] );
			}

			if( !empty( $desc ) ) {
				$options[$key]['long'] = str_replace( '\\/', '/', $desc );
			}
		}

		return $result;
	}