@param string $prefix

@return array
434859
private function getImportFilters($prefix = 'filter')
    {
        $filters = [];
        try {
            $methods = (new \ReflectionClass(static::class))->getMethods();
            foreach ($methods as $methodDetails) {
                $methodName = $methodDetails->name;
                if (stripos($methodName, $prefix) === 0) {
                    $filters[] = [$this, $methodName];
                }
            }

        } catch (\ReflectionException $ex) {

        }
        return $filters;
    }
16139
public function getKeys($prefix = null, $type = null)
    {
        $map = $this->getMap();
        $keys = array_keys($map);

        $result = [];

        foreach ($keys as $key) {
            if (null === $prefix || (is_string($prefix) && strpos($key, $prefix))) {
                if (0 === $type) {
                    $result[$key] = $key;
                } else {
                    $v = $map[$key];

                    if ($type === $v->getType()) {
                        $result[$key] = $key;
                    }
                }
            }
        }

        return $result;
    }
385923
public function prefix($prefix)
    {
        if ($this->parent && $this->parent->getOption('prefix')) {
            $prefix = $this->parent->getOption('prefix') . $prefix;
        }

        return $this->option('prefix', $prefix);
    }
810389
protected function normalize(array $data, string $prefix = null): array
    {
        if ($prefix) {
            $prefix .= '.';
        }

        $result = [];
        foreach ($data as $item) {
            $value = [
                'label' => (string)$item['label'],
                'inactive' => (bool)$item['inactive']
            ];

            if (! empty($item['children'])) {
                $value['children'] = $this->normalize($item['children'], $prefix . $item['value']);
            }
            $result[$prefix . $item['value']] = $value;
        }

        return $result;
    }
738447
public function getHelp($prefix)
    {
        $helpString = "{$prefix}{$this->command} {$this->usage}- {$this->description}\r\n";

        foreach ($this->subCommands as $command) {
            $help = $command->getHelp($prefix.$this->command.' ');
            $helpString .= "    {$help['text']}\r\n";
        }

        return [
            'text'              => $helpString,
            'subCommandAliases' => $this->subCommandAliases,
        ];
    }
1039860
public static function keys($array, $prefix = null)
    {
        $keys = array_keys($array);

        if (! empty($prefix)) {
            $keys = static::prefix($keys, $prefix);
        }

        return $keys;
    }
662554
public function filterPrefix($prefix)
    {
        $names = [];

        foreach ($this->getMethods() as $method) {
            if ($method->isPublic() && substr_count($method->getName(), $prefix, null, strlen($prefix))) {
                $names[] = $method->getName();
            }
        }

        return $names;
    }
730314
private function getCompletionsForKeywords(string $prefix): \Generator
    {
        foreach (self::KEYWORDS as $keyword) {
            if (nameStartsWith($keyword, $prefix)) {
                $item = new CompletionItem($keyword, CompletionItemKind::KEYWORD);
                $item->insertText = $keyword;
                yield $keyword => $item;
            }
        }
    }
1304505
public static function filter_prefixed($array, $prefix, $removePrefix = true)
    {
        $return =[];
        foreach ($array as $key => $val) {
            if (preg_match('/^'.$prefix.'/', $key)) {
                if ($removePrefix === true) {
                    $key = preg_replace('/^'.$prefix.'/','',$key);
                }
                $return[$key] = $val;
            }
        }
        return $return;
    }
1360190
public static function getEnumTypes($prefix)
    {
        if (!isset(static::$ENUMS[$prefix]) || !is_array(static::$ENUMS[$prefix]) || !static::$ENUMS[$prefix]) {
            static::$ENUMS[$prefix] = array();
            $name = static::getClassNamespace();
            $ref = new ReflectionClass($name);
            foreach ($ref->getConstants() as $k => $d) {
                $matches = array();
                if (is_string($k) && preg_match('/^'.preg_quote($prefix).'_(.*)/', $k, $matches)) {
                    static::$ENUMS[$prefix][$d] = $matches['1'];
                }
            }
        }

        return static::$ENUMS[$prefix];
    }
712378
public function deletePrefix($prefix)
    {
        if ($this->startWith($prefix) === true) {
            return substr($this->str, strlen($prefix));
        }

        return $this->str;
    }
1164833
public function getTables( $prefix = NULL ){
		$query		= "SHOW TABLES" . ( $prefix ? " LIKE '".$prefix."%'" : "" );
		return parent::query( $query )->fetchAll( PDO::FETCH_COLUMN );
	}
1282538
public function getConfig($prefix){
		/* @var $siteConfigService EyeService */
		$siteConfigService = $this->getServiceLocator()->get(EyeService::class);
		$config = $siteConfigService->getAll();
		
		// get config selected by prefix
		$prefixParts = explode('.', $prefix);
		$conf = $config;
		foreach ($prefixParts as $prefix) {
			if(isset($conf[$prefix])){
				$conf = $conf[$prefix];
			} else {
				$conf = array();
			}
		}
		return $conf;
	}
176962
public function nestArray($prefix, $array)
    {
        $data = [];
        foreach($array as $key => $value) {
            array_set($data, $prefix.$key, $value);
        }
        return $data;
    }
41140
public function prefixValues(array $arguments, $prefix)
    {
        $skip = ['id', 'ID'];

        return array_map(function ($key) use ($prefix, $skip) {
            if (in_array($key, $skip)) {
                return $key;
            }

            return "{$prefix}{$key}";
        }, $arguments);
    }
800896
public function prefix( $prefix )
    {
        // Detect the Regexp delimiter
        $patternDelim = $this->pattern[0];

        // Add the Regexp delimiter to the prefix
        $prefix = $patternDelim . $prefix . $patternDelim;
        parent::prefix( $prefix );
    }
1307546
public function getKeysWithPrefix($prefix)
    {
        $prefix = trim($prefix);
        if (!$prefix) {
            return [];
        }
        $lastIndex = strlen($prefix) - 1;
        $lastChar = $prefix[$lastIndex];
        $nextAsciiCode = ord($lastChar) + 1;
        $rangeEnd = $prefix;
        $rangeEnd[$lastIndex] = chr($nextAsciiCode);

        return $this->get($prefix, ['range_end' => $rangeEnd]);
    }