@param string $name

@return array

@throws \marvin255\bxmigrate\migrate\Exception
351926
public function uninstallModule($name)
    {
        $return = [];
        if (!($module = CModule::CreateModuleObject($name))) {
            throw new Exception("Module {$name} not found");
        } elseif (!$module->IsInstalled()) {
            throw new Exception("Module {$name} already uninstalled");
        } else {
            $module->DoUninstall();
            $return[] = "Module {$name} uninstalled";
        }

        return $return;
    }
1260923
public function getValues($name)
    {
        $return = [];
        $items  = $this->getItems();

        foreach ($items as $type) {
            $method = 'get' . ucfirst($name);
            if (method_exists($type, $method)) {
                $return[] = $type->$method();
            } else {
                $return[] = $type->{$name};
            }
        }

        return $return;
    }
350467
protected function getIndex(string $name = null): array
    {
        return self::query($this->db->createIndex($name ? $name : $this->tableName));
    }
1322355
public static function getSet(string $name): array
    {
        $obj = new RedisSet(self::handle(), $name);
        return $obj->all();
    }
430105
public function actionCreate($name, $module = false)
    {
        if (empty($module)) {
            return parent::actionCreate($name);
        }
        
        if (!isset($this->migrationPath[$module])) {
            throw new Exception("The module \"$module\" does not exist in the application modules configuration.");
        }
        
        // apply custom migration code to generate new migrations for a module specific path
        if (!preg_match('/^[\w\\\\]+$/', $name)) {
            throw new Exception('The migration name should contain letters, digits, underscore and/or backslash characters only.');
        }
        
        $className = 'm'.gmdate('ymd_His').'_'.$name;
        
       
        $migrationPath = $this->migrationPath[$module];
        
        $file = $migrationPath . DIRECTORY_SEPARATOR . $className . '.php';
        if ($this->confirm("Create new migration '$file'?")) {
            $content = $this->generateMigrationSourceCode([
                'name' => $name,
                'className' => $className,
                'namespace' => null,
            ]);
            FileHelper::createDirectory($migrationPath);
            file_put_contents($file, $content);
            $this->stdout("New migration created successfully.\n", Console::FG_GREEN);
        }
    }
326732
public function allOf(string $name): array
    {
        $oid = AttributeType::attrNameToOID($name);
        $attrs = array_filter($this->_attributes,
            function (Attribute $attr) use ($oid) {
                return $attr->oid() == $oid;
            });
        return array_values($attrs);
    }
551682
protected function getPossibleViewFiles(string $name): array
    {
        return array_map(function ($extension) use ($name) {
            return str_replace('.', '/', $name) . '.' . $extension;
        }, $this->extensions);
    }
1353837
protected static function _find_app($name = null)
	{
		$found = array();

		$files = new \GlobIterator(APPPATH.\Config::get('migrations.folder').'*_*.php');
		foreach($files as $file)
		{
			$found[] = $file->getPathname();
		}

		return $found;
	}
1119784
public function getEvent(string $name): array
    {
        return isset($this->events[$name]) ? $this->events[$name] : [];
    }
1217137
public function getFiles(string $name = null) : array
    {
        if ($name === null) {
            return $this->files;
        }

        $files = $this->resolvePath($this->files, $name);

        if ($files instanceof UploadedFile) {
            return [$files];
        }

        if (is_array($files)) {
            return array_filter($files, static function ($file) {
                return $file instanceof UploadedFile;
            });
        }

        return [];
    }
551624
private function migrate($name, $params = [])
    {
        $generator = new TemplateGenerator();
        $generator->setContent(file_get_contents($name));

        return $generator->generate($params);
    }
66065
public function create($name, $template = null, array $data = [])
    {
        $migrationName = $this->clearMigartionName($name);
        if ($migrationName === '') {
            throw new Exception("Empty or wrong migration name: {$name}");
        }

        $ts = time();
        $migrationName = "{$this->fileNamePrefix}_{$ts}_{$migrationName}";
        $pathToFile = $this->getPathToMigrationFile($migrationName);
        $migrationData = [
            'name' => $migrationName,
            'parentClass' => '\\marvin255\\bxmigrate\\migrate\\Coded',
        ];
        $migrationData = array_merge($migrationData, $data);

        if ($template === null) {
            list($template, $defaultData) = $this->getDefaultView($name);
            $migrationData = array_merge($defaultData, $migrationData);
        }

        if (!file_exists($template)) {
            throw new Exception(
                "Can't find migration template file {$template} for migration {$name}"
            );
        }

        $migrationText = $this->renderMigration($template, $migrationData);
        file_put_contents($pathToFile, $migrationText);

        return $migrationName;
    }
331871
protected function getMeta(string $name = null): array
    {
        return self::query($this->db->createDesc($name ? $name : $this->tableName));
    }
192273
public function getPolicyByHostname($name)
    {
        if (! $this->inventory->hasHost($name)) {
            return array();
        }

        $policy = array();
        $host = $this->inventory->getHost($name);

        foreach ($this->inventory->getHostGroupsByHost($host) as $group) {
            $policy = array_replace_recursive($policy, $group->getFirewallPolicy());
        }

        return array_replace_recursive($policy, $host->getFirewallPolicy());
    }
1113763
public function getSingleTemplate(string $name): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/gitignore/templates/:name', $name));
    }
990680
public function getRaw(string $name): array
    {
        if (strtolower($name) === 'cache-control') {
            return $this->getCacheControlDirectives();
        }

        if (strtolower($name) === 'set-cookie') {
            $cookies = $this->fields['Set-Cookie'] ?? [];
            foreach ($this->cookies as $cookie) {
                $cookies[] = (string)$cookie;
            }

            return $cookies;
        }
        if (!isset($this->fields[$name])) {
            return [];
        }

        return $this->fields[$name];
    }
1227844
private static function getProcessMaping(string $name): array
    {
        $collector = ProcessCollector::getCollector();
        if (!isset($collector[$name])) {
            throw new ProcessException(sprintf('The %s process is not exist! ', $name));
        }

        $process = $collector[$name];
        if (!isset($process['name']) || !isset($process['boot']) || !isset($process['pipe']) || !isset($process['inout']) || !isset($process['co'])) {
            throw new ProcessException(sprintf('The %s process is ncomplete ! data=%s', $name, json_encode($process, JSON_UNESCAPED_UNICODE)));
        }

        $data = [
            $process['name'],
            $process['boot'],
            $process['pipe'],
            $process['inout'],
            $process['co'],
        ];

        return $data;
    }