获取可用字段类别 **

@return  array
420085
public function type()
	{
		$file = new Filesystem();
        $path    = realpath(__DIR__.'/../Libraries/Fields');
        $fields = $file->glob($path.'/*.php');
		$data = [];
        if($fields) {
        	foreach ($fields as $key => $value) {
				$name = substr(basename($value), 0, -4);
				if($name != 'FieldAbs') {
					$obj = $this->get($name);
					$data[] = array('id' => $name, 'name' => $obj->name);
				}
        	}
        }
		return $data;
	}
84176
public function toArray()
    {
        return array(
            'year' => $this->year,
            'month' => $this->month,
            'day' => $this->day,
            'dayOfWeek' => $this->dayOfWeek,
            'dayOfYear' => $this->dayOfYear,
            'hour' => $this->hour,
            'minute' => $this->minute,
            'second' => $this->second,
            'micro' => $this->micro,
            'timestamp' => $this->timestamp,
            'formatted' => $this->format(self::DEFAULT_TO_STRING_FORMAT),
            'timezone' => $this->timezone,
        );
    }
797572
public function toArray()
    {
        $array = [];

        if (!empty($this->getBefore())) {
            $array['before'] = [];
            foreach ($this->getBefore() as $beforeAction) {
                $array['before'][] = $beforeAction->toArray();
            }
        }

        if (!empty($this->getAfter())) {
            $array['after'] = [];
            foreach ($this->getAfter() as $afterAction) {
                $array['after'][] = $afterAction->toArray();
            }
        }

        return $array;
    }
244423
public function toArray()
	{
		$price = $this->_price;
		$locale = $this->_locale;

		return array(
			'order.base.id' => $this->getId(),
			'order.base.siteid' => $this->getSiteId(),
			'order.base.sitecode' => $this->getSiteCode(),
			'order.base.languageid' => $locale->getLanguageId(),
			'order.base.comment' => $this->getComment(),
			'order.base.customerid' => $this->getCustomerId(),
			'order.base.price' => $price->getValue(),
			'order.base.costs' => $price->getCosts(),
			'order.base.rebate' => $price->getRebate(),
			'order.base.currencyid' => $price->getCurrencyId(),
			'order.base.status' => $this->getStatus(),
			'order.base.mtime' => $this->getTimeModified(),
			'order.base.ctime' => $this->getTimeCreated(),
			'order.base.editor' => $this->getEditor(),
		);
	}
1259510
public function getHeaders()
    {
        if ($this->headers) {
            return $this->headers;
        }

        $this->headers = [
            'STATUS' => $this->code(),
        ];

        $originHeaders = explode("\r\n\r\n", $this->originHeaders);
        $originHeader = array_pop($originHeaders);
        foreach (explode("\r\n", $originHeader) as $i => $header) {
            if ($i == 0 || !$header) {
                continue;
            }

            $header = explode(':', $header, 2);
            $header[0] = strtoupper($header[0]);
            if ($header[0] == 'SET-COOKIE') {
                $this->headers[$header[0]][] = isset($header[1]) ? trim($header[1]) : '';
            } else {
                $this->headers[$header[0]] = isset($header[1]) ? trim($header[1]) : '';
            }
        }

        return $this->headers;
    }
735583
public function toArray()
    {
        return [
            'id'          => $this->id,
            'module'      => $this->module,
            'bundle'      => $this->bundle,
            'position'    => $this->position,
            'name'        => $this->name,
            'description' => $this->description,
            'category'    => $this->category,
            'active'      => $this->active,
            'tags'        => $this->tags
        ];
    }
1370092
public function toArray()
    {
        return [
            'fileId' => $this->file->getId(),
            'fileVersion' => $this->file->getVersion(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
741365
public function getValues()
    {
        $result = [];
        $defaults = $this->defaults();
        foreach ($defaults as $name => $value) {
            if ($this->getData()->has($name)) {
                $result[$name] = $this->getData()->get($name);
            } else {
                $result[$name] = $value;
            }
        }
        return $result;
    }
435377
public function get()
    {
        $result = [];

        foreach ($this->map as $attribute => $key) {
            $value = $this->getByKey($key);
            $result[$attribute] = $value;
        }

        return $result;
    }
678950
public function getAttributes()
    {
        return [
            'name'        => $this->name,
            'shortcut'    => $this->shortcut,
            'mode'        => $this->mode,
            'description' => $this->description,
            'default'     => $this->default,
        ];
    }
466543
public function getValues() : array
    {
        $values = [];

        foreach ($this->inputs as $input) {
            $values[] = $input->getValue();
        }

        return $values;
    }
978965
public function get_headers()
	{
		$headers = array();
		foreach ($this->headers as $key => $value)
		{
			$headers[] = is_int($key) ? $value : $key.': '.$value;
		}

		return $headers;
	}
1280779
public function getArray()
  {
    $errors = empty($this->errors) ? null : $this->errors;

    $response = array(
        'status' => $this->getStatus(),
        'data'   => $this->data,
        'errors' => $errors,
    );

    if (!is_null($this->code)) {
      $response['code'] = $this->code;
    }

    if (!is_null($this->message)) {
      $response['message'] = $this->message;
    }

    return $response;
  }
754688
public function getData()
    {
        return [
            'recipient' => $this->user_ref ? ['user_ref' => $this->recipient] : ['id' => $this->recipient],
            'message' => [
                'text' => $this->text
            ],
            'tag'=> $this->tag,
            'notification_type'=> $this->notification_type,
            'messaging_type' => $this->messaging_type
        ];
    }
1147638
public function get(): array
    {
        $data = [];

        foreach ($this->data as $row) {
            $data[] = $row->get();
        }

        return $data;
    }
1264181
public function toArray()
        {
            return [
                'tag' => $this->tag,
                'void' => $this->void,
                'attributes' => $this->attributes,
                'content' => $this->recursivelyArrayify($this->content)
            ];
        }
138080
public function fetch()
    {
        $parsedName = $this->getParsedMigrationName();
        $parsedFields = $this->getParsedMigrationFields();

        return [
            'class' => $this->getClass(),
            'up'    => $this->getMigrationUp($parsedName, $parsedFields),
            'down'  => $this->getMigrationDown($parsedName, $parsedFields)
        ];
    }