@param $name

@return array
768585
protected function getProcessInfo($name)
    {
        $pidFile = $this->pidPath.'/'.$name.'.pid';
        $pid = file_exists($pidFile) ? (int) file_get_contents($pidFile) : '';
        $isRunning = false;
        if (is_numeric($pid)) {
            $isRunning = process_kill($pid, 0);
        }

        return [
            $name,
            $isRunning ? $pid : '',
            $isRunning ? 'running' : 'stopped',
            $isRunning ? date('Y-m-d H:i:s', filemtime($pidFile)) : '',
            $isRunning ? time() - filemtime($pidFile) : '',
        ];
    }
925770
protected function _parseName($name)
    {
        $result = [];
        $parts = preg_split('~([^\\\]*\\\?)~', $name, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

        $last = array_pop($parts);

        if (!$last) {
            return [];
        }

        foreach ($parts as $name) {
            $result[] = [$name, 'namespace'];
        }

        if (strpos($last, '::') !== false) {
            list($name, $subname) = explode('::', $last, 2);
            $result[] = [$name, 'class'];
            $result[] = [$subname, 'method'];
        } elseif (preg_match('~\(\)$~', $last)) {
            $result[] = [$last, 'function'];
        } else {
            $result[] = [$last, substr($last, -1) === '\\' ? 'namespace' : 'class'];
        }
        return $result;
    }
969009
public function findAllByName($name)
    {
        $datasourceNodes = array();
        foreach ($this->findAll() as $datasourceNode) {
            if ($datasourceNode->getName() === $name) {
                $datasourceNodes[$datasourceNode->getPrimaryKey()] = $datasourceNode;
            }
        }

        return $datasourceNodes;
    }
1001678
public function getChildren(string $name = ''): array
    {
        $nodes = [];

        foreach ($this->children as $node) {
            if (!$name || strcasecmp($node->getName(), $name) == 0) {
                $nodes[] = $node;
            }
        }

        return $nodes;
    }
1310700
private function getEnvArray($name): array
    {
        $env = config("api.$name", null);

        if ($env === true) {
            $env = 'true';
        }

        if ($env === false) {
            $env = 'false';
        }


        if ($env === null) {
            return [];
        }

        if ($env === '') {
            return [];
        }

        return explode(',', $env);
    }
464442
public function getHeader($name) : array
    {
        return (($this->headers->has($name) === true) ? $this->headers->get($name) : []);
    }
1200714
public function getColumnRaw($name)
    {
        $results = [];
        foreach ($this->entities as $entity) {
            $results[] = $entity->getRaw($name);
        }

        return $results;
    }
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];
    }
1117985
protected function getConfig(string $name): array
    {
        if (isset($this->app['config']['self-update']['repository_types'][$name])) {
            return $this->app['config']['self-update']['repository_types'][$name];
        }

        return [];
    }
409795
public function getAssignmentsByName($name)
    {
        $result = [];

        foreach ($this->getAssignments() as $assignment) {
            /* @var AssignmentElement $assignment */
            if ($assignment->getName() === $name) {
                $result[] = $assignment;
            }
        }

        return $result;
    }
215798
public function getTags($name = null)
  {
    if (!$name) return $this->tags;
    
    return isset($this->tags[$name]) ? $this->tags[$name] : [];
  }
483668
public function getPackages(string $name = null): array
    {
        if (isset($this->packages[$name])) {
            return $this->packages[$name];
        }

        return $this->packages;
    }
1348680
public function getRowsMetadata($name)
    {
        $metadataValues = array();
        foreach ($this->getRows() as $row) {
            $metadataValues[] = $row->getMetadata($name);
        }
        return $metadataValues;
    }
185026
public function getFieldAsArray(string $name): array
    {
        $result = $this->getFieldDefinition($name);

        $result['name'] = $name;

        if (empty($result['caption'])) {
            $result['caption'] = $this->_($result['name']);
        }

        $value = $this->$name;
        $type = @$result['type'];

        if (($type == 'date' || $type == 'datetime' || $type == 'time') && is_object($value)) {
            $value = $value->format($this->translate('form.' . $type));
        }

        $result['value'] = $value;
        $result['uid'] = 'id' . uniqid();

        if (isset($result['options']) && is_array($result['options'])) {
            $options = array();

            foreach ($result['options'] as $option => $label) {
                $options[] = array('option' => $option, 'label' => $label);
            }

            $result['options'] = $options;
        }

        return $result;
    }
970780
public function get($name = '')
	{
		// This needs to be extended by somebody else!
		if(!$this->_app->name)
			return [];

		// Not defined huh?
		if (!$this->_config)
			$this->getConfig();

		return $name ? (isset($this->_config['_'. $name]) ? $this->_config['_'. $name] : []) : $this->_config;
	}
939115
public function get($name)
    {
        $valueList = array();
        foreach ($this as $model) {
            $valueList[$model->id] = $model->get($name);
        }
        return $valueList;
    }
815360
public function fetchParams(string $name): array
    {
        $bag = $this->request->request;

        return $bag->has($name) ? $bag->get($name, []) : $bag->all();
    }