Apply an extract filter and return the results after filter
all the documents in the collection
@param IExtractStrategy $extract
@return array
199209
public function applyExtract(IExtractStrategy $extract)
    {
        $found = [];
        foreach($this->tokens as $token) 
        { 
            if($extract->filter($token)) {
                $found[] = $token;
            }
        }
        return $found;
    }
1003832
private function extract($extractPath, $archive)
    {
        $res = $archive->extractTo($extractPath);
        $archive->close();
        $this->setExtractPath($extractPath);
        $resolver = new Resolver($extractPath);
        $this->data = $resolver->resolve();
    }
945565
public function extract($object)
    {
        return [
            'type' => $object->getType(),
            'data' => $object->getData(),
            'store' => $object->getStore(),
            'download' => $object->isDownload(),
            'output_filename' => $object->getOutputFilename(),
            'category' => $object->getCategory(),
        ];
    }
342424
public function extract(){
        foreach($this->item->getComposingElements() as $element){
            $this->extractImg($element);
            $this->extractObject($element);
            $this->extractStyleSheet($element);
            $this->extractCustomElement($element);
            if($this->getGetXinclude()){
                $this->extractXinclude($element);
            }
        }
        return $this->assets;
    }
275594
public function extract(array $context)
    {
        $params = [];

        foreach ($this->fields as $field) {
            if (isset($context[$field])) {
                $params[$field] = $context[$field];
                unset($context[$field]);
            }
        }

        if (!empty($context)) {
            $params['context'] = $context;
        }

        return $params;
    }
869835
public function canExtract($source, $type, ExtractionContextInterface $extractionContext)
    {
        if (!$type instanceof Schema) {
            return false;
        }

        if (!$source instanceof ReflectionClass) {
            return false;
        }

        $constraints = $this->getPropertiesConstraints(
            $source,
            $type,
            $this->getValidationGroups($extractionContext)
        );

        return count($constraints);
    }
780874
private function extract($source) {
		try {
			$task = new Task\Extract($source);
			$dest = $task->run($this->verbosity());
		} catch (\Exception $e) {
			if (false === strpos($e->getMessage(), "checksum mismatch")) {
				throw $e;
			}
			$dest = (new Task\PaxFixup($source))->run($this->verbosity());
		}
		
		$this->cleanup[] = new Task\Cleanup($dest);
		return $dest;
	}
305749
protected function _extractFinder($options)
    {
        $type = !empty($options['finder']) ? $options['finder'] : 'all';
        unset($options['finder'], $options['maxLimit']);

        if (is_array($type)) {
            $options = (array)current($type) + $options;
            $type = key($type);
        }

        return [$type, $options];
    }
629989
protected function applySearchAndReplaceOperations()
    {
        foreach (Files::getRecursiveDirectoryGenerator($this->targetPackageData['path'], null, true) as $pathAndFilename) {
            $pathInfo = pathinfo($pathAndFilename);
            if (!isset($pathInfo['filename'])) {
                continue;
            }
            if (strpos($pathAndFilename, 'Migrations/Code') !== false) {
                continue;
            }

            foreach ($this->operations['searchAndReplace'] as $operation) {
                list($search, $replacement, $filter, $regularExpression) = $operation;
                if (is_array($filter)) {
                    if ($filter !== array() && (!isset($pathInfo['extension']) || !in_array($pathInfo['extension'], $filter, true))) {
                        continue;
                    }
                } elseif (substr($pathAndFilename, -strlen($filter)) !== $filter) {
                    continue;
                }
                Tools::searchAndReplace($search, $replacement, $pathAndFilename, $regularExpression);
            }
        }
    }
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];
            }
        }
    }
841256
function extract(type) {
			for(var index = 0; index < 3; index++) {
				if (typeof args[index] === type) { return args[index]; }
			}
		}
838017
public function extract_first($rules)
    {
        if ($this->_nodes) {
            $selector = new Selector($this->_document, current($this->_nodes));
            return $selector->extract($rules);
        } else {
            return [];
        }
    }
1190375
function extract($arr,$prefix) {
		$out=[];
		foreach (preg_grep('/^'.preg_quote($prefix,'/').'/',array_keys($arr))
			as $key)
			$out[substr($key,strlen($prefix))]=$arr[$key];
		return $out;
	}
811500
protected function extractFiles($resource)
    {
        if (\is_array($resource) || $resource instanceof \Traversable) {
            $files = [];
            foreach ($resource as $file) {
                if ($this->canBeExtracted($file)) {
                    $files[] = $this->toSplFileInfo($file);
                }
            }
        } elseif (is_file($resource)) {
            $files = $this->canBeExtracted($resource) ? [$this->toSplFileInfo($resource)] : [];
        } else {
            $files = $this->extractFromDirectory($resource);
        }

        return $files;
    }
1260935
public function extractTo($destination, $entities = null)
    {
        if ($entities) {
            return $this->zipArchive->extractTo($destination, $entities);
        } else {
            return $this->zipArchive->extractTo($destination);
        }
    }
1210251
protected function buildFilterArray($blocks)
    {
        $filter   = [];
        $excluded = [];
        foreach ($blocks as $block) {
            $this->extractFilter($block, $filter, $excluded);
        }
        return ['paths' => $filter, 'excluded' => $excluded];
    }
293179
def extract!( *list )
      list.each do |a|
        if a.is_a?(Hash)
          a.each { |t, o| adapter(t, o) }
        else
          adapter(a)
        end
      end
    end