Generate the default stat() array, which is both associative and index
based.

@access private
352465
protected function createStatArray($stat_args) {
    $stat_keys = ["dev", "ino", "mode", "nlink", "uid", "gid", "rdev", "size",
        "atime", "mtime", "ctime", "blksize", "blocks"];

    $result = [];

    foreach ($stat_keys as $key) {
      $value = 0;
      if (array_key_exists($key, $stat_args)) {
        $value = $stat_args[$key];
      }
      // Add the associative entry.
      $result[$key] = $value;
      // Add the index entry.
      $result[] = $value;
    }

    return $result;
  }
65648
protected function buildDefault()
    {
        $attribStrings = $this->buildAttribStrings($this->props);
        $props = \array_merge($this->props, $attribStrings);
        if (empty($props['input'])) {
            // $props['attribs'] is already a string, but that's OK
            $this->props['input'] = Html::buildTag($props['tagname'], $props['attribs']);
            $props['input'] = $this->buildInputGroup();
        }
        return $props['tagOnly']
            ? $props['input']
            : Str::quickTemp($props['template'], $props);
    }
940613
public function stat(): array
    {
        $result = fstat($this->handle);

        if (false === $result) {
            $message = 'Could not stat file.';
            if ($error = error_get_last()) {
                $message .= sprintf(' Errno: %d; %s', $error['type'], $error['message']);
            }
            throw new FileException($message);
        }

        return $result;
    }
953404
public function getSortConditionsDefault()
    {
        $sortConditions = [];
        foreach ($this->getColumns() as $column) {
            /* @var $column \ZfcDatagrid\Column\AbstractColumn */
            if ($column->hasSortDefault() === true) {
                $sortDefaults = $column->getSortDefault();

                $sortConditions[$sortDefaults['priority']] = [
                    'column' => $column,
                    'sortDirection' => $sortDefaults['sortDirection'],
                ];

                $column->setSortActive($sortDefaults['sortDirection']);
            }
        }

        ksort($sortConditions);

        return $sortConditions;
    }
854747
public function getIndex() : ?string 
    {
        if ( ! $this->hasIndex()) {
            $this->setIndex($this->getDefaultIndex());
        }
        return $this->index;
    }
1010304
public function getDefaultValue()
    {
        if (null !== $this->defaultChildren) {
            $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : [];
            $defaults = [];
            foreach (array_values($this->defaultChildren) as $i => $name) {
                $defaults[null === $this->keyAttribute ? $i : $name] = $default;
            }

            return $defaults;
        }

        return $this->defaultValue;
    }
897450
public function defaultData()
    {
        return [
            'property'    => null,
            'table'       => null,
            'value'       => null,
            'func'        => null,
            'operator'    => self::DEFAULT_OPERATOR,
            'conjunction' => self::DEFAULT_CONJUNCTION,
            'filters'     => [],
            'condition'   => null,
            'active'      => true,
            'name'        => null,
        ];
    }
129358
protected function get_default_data() {
        $data = parent::get_default_data();
        $data->taxonomies = $this->get_persistent()->get('taxonomies');
        return $data;
    }
573462
private function defaultDicionarioData()
    {
        $this->dicionario = [];
        if ($dicEntity = Metadados::getDicionario($this->entity, true, true)) {
            foreach ($dicEntity as $i => $item) {
                if (!isset($item['id']))
                    $item['id'] = $i;
                $this->dicionario[$i] = new Meta($item, $this->defaultMeta['default']);
            }
            $this->addSelectUniqueMeta();
        }
    }
502670
public function actionIndex()
    {
        $data = [
            [
                'f1' => $this->getContext()->getInput()->get('p1'),
                'f2' => $this->getContext()->getInput()->get('p2'),
            ],
            [
                'f1' => $this->getContext()->getInput()->get('p1'),
                'f2' => $this->getContext()->getInput()->get('p2'),
            ]
        ];
        $this->outputJson($data);
        //$this->outputJson(null, 'canshucuowuyo', 401);
    }
243590
public function toArray() {
        $data = parent::toArray();
        foreach (array('_related', '_virtual') as $prop) {
            foreach ($this->{$prop} as $key => $val) {
                if ($val instanceof Zend_Db_Table_Row_Abstract
                    || $val instanceof Zend_Db_Table_Rowset_Abstract
                ) {
                    $data[$key] = $val->toArray();
                } else {
                    $data[$key] = $val;
                }
            }
        }
        return $data;
    }
1234654
function arrayDefaults(arr, values) {
  values.forEach(function(x) {
    if (!~arr.indexOf(x)) arr.push(x)
  })
}
112833
public function stream_stat()
    {
        $mode = $this->stream->isWritable()
            ? self::FILE_WRITABLE_MODE
            : self::FILE_READABLE_MODE;
        return $this->makeStatArray([
            'mode'    => $mode,
            'size'    => $this->stream->getSize()
        ]);
    }
115784
function getJsSortAttribute() {
        $len  = 6;
        $sort = [];
        if (!$this->default_sort) {
            return str_pad($this->id, 10, '0', STR_PAD_LEFT);
        }
        foreach ($this->default_sort as $k => $v) {
            $val = $this->{$k};
            if ('desc' == $v) {
                if (is_numeric($val)) {
                    $val = pow(10, $len) - intval($val);
                }
            }
            $sort[] = str_pad(mb_substr($val, 0, $len + 1), $len + 1, '0', STR_PAD_LEFT);
        }

        return implode('_', $sort);
    }
91149
public function getDefaultValues()
    {
        $result = [];

        foreach ($this->getFormFields() as $attribute => $field) {
            if (($value = array_get($field, 'default')) === null) {
                continue;
            }

            $result[$attribute] = $value;
        }

        return $result;
    }
61767
protected function setDefaultParams()
    {
        foreach ($this->allowedParams as $param => $options) {
            $this->params[$param] = null;
            if (! empty($options['arguments'])) {
                $this->params[$param] = array();
                foreach ($options['arguments'] as $arg => $opts) {
                    if (! empty($opts['default'])) {
                        $cast = ! empty($opts['cast']) ? $opts['cast'] : 'string';
                        $this->params[$param][$arg] = $this->castValue($cast, $opts['default']);
                    }
                }
            } elseif (! empty($options['default'])) {
                $cast = ! empty($options['cast']) ? $options['cast'] : 'string';
                $this->params[$param] = $this->castValue($cast, $options['default']);
            }
        }
    }
1301817
protected function _default()
    {
        $this->url           = NULL;
        $this->data          = NULL;
        $this->sslVerifyPeer = false;
    }