Returns the rewrites as an associative array.

@return array The array with the sorted rewrites
14095
public function getAccessesAsArray()
    {

        // initialize the array for the accesses
        $accesses = array();

        // iterate over the access nodes and sort them into an array
        /** @var \AppserverIo\Appserver\Core\Api\Node\AccessNode $accessNode */
        foreach ($this->getAccesses() as $accessNode) {
            $accesses[$accessNode->getType()][] = $accessNode->getParamsAsArray();
        }

        // return the array
        return $accesses;
    }
614740
public function toArray()
	{
		$properties = parent::toArray();

		$properties[$this->_prefix . 'refid'] = $this->getRefId();
		$properties[$this->_prefix . 'position'] = $this->getPosition();

		return $properties;
	}
1090920
public function parse() : array
    {
        $buffer = $this->routing_rule;
        
        $section_list_set = [];
        $current_list = [];
        do
        {
            $pos = strpos(substr($buffer,1),'/');
            $section = $pos !== false ? substr($buffer, 1, $pos) : substr($buffer, 1);
            $buffer = $pos !== false ? substr($buffer, $pos + 1) : '';
            
            $length = strlen($section);
            if ($length === 0){
                $current_list[] = new class implements EmptyRoutingPathInterface {};
                if (!empty($buffer)){
                    throw new RoutingRuleParseException($this->routing_rule, "Empty routing section is allowed only for last element");
                }
                break;
            }
            $first = $section[0];
            $last = $section[$length - 1];
            if ($first === '[' && $last === ']'){
                // push current list
                $section_list_set[] = $current_list + ['()'];
                // add optional part to current list
                $inside = substr($section, 1, $length - 2);
                if ($inside[0] === ':') {
                    $current_list[] = self::parseVariablePattern($inside);
                }
                else {
                    $current_list[] = $inside;
                }
            }
            else if ($first === ':') {
                $current_list[] = self::parseVariablePattern($section);
            }
            else {
                $current_list[] = $section;
            }
        }
        while(!empty($buffer));
        
        $section_list_set[] = $current_list;
        return $section_list_set;
    }
1203339
public function toArray()
    {
        $headers = array();

        //Method to implode header parameters
        $implode = function($parameters)
        {
            $results = array();
            foreach ($parameters as $key => $parameter)
            {
                if(!is_numeric($key))
                {
                    //Parameters
                    if(is_array($parameter))
                    {
                        $modifiers = array();
                        foreach($parameter as $k => $v) {
                            $modifiers[] = $k.'='.$v;
                        }

                        $results[] = $key.';'.implode($modifiers, ',');
                    }
                    else $results[] = $key.'='.$parameter;
                }
                else $results[] = $parameter;
            }

            return $value = implode($results, ', ');
        };

        //Serialise the headers to an array
        ksort($this->_data);
        foreach ($this->_data as $name => $values)
        {
            $name    = implode('-', array_map('ucfirst', explode('-', $name)));
            $results = array();

            foreach($values as $value)
            {
                if(is_array($value)) {
                    $results[] = $implode($value);
                }  else {
                    $results[] = $value;
                }
            }

            if ($value = implode($results, ', ')) {
                $headers[$name] = $value;
            }
        }

        return $headers;
    }
1334205
public function getAttributes()
    {
        // prevent order of fields from changing
        $sortedAttribs = [];
        foreach ($this->sortedFields as $ix => $attribute) {
            $sortedAttribs[$attribute] = $this->attributes[$attribute];
        }

        return $sortedAttribs;
    }
900621
public function simpleRendeArray()
    {
        $array = [];
        $count = $this->paginator->getCount();
        $url = $this->path;
        $current = $this->paginator->getCurrentPage();

        // create appends string
        $appends = $this->createAppendString($this->paginator->getAppends());

        // create fragments string
        $fragments = $this->createFragmentsString($this->paginator->getFragments());


        if ($count < $this->paginator->getPerPage()) {
            $limit = 1;
        } else {
            $limit = ceil($count / $this->paginator->getPerPage());
        }


        if ($this->isAvaibleCurrentPage($current) && $current > 1) {

            $previous = $current - 1;
            $array[] = $this->buildChieldString('Previous', $this->buildFullChieldStrind($url, $appends), $this->pageName, $fragments, $previous);

        }

        if ($this->isAvaibleCurrentPage($current) && $current < $limit) {
            $next = $current + 1;

            $array[] = $this->buildChieldString('Next', $this->buildFullChieldStrind($url, $appends), $this->pageName, $fragments, $next);
        }

        return $array;
    }
1062871
public function getDirty()
    {
        $dirty    = [];
        $original = $this->getCastedOriginal();

        foreach ($this->attributes as $key => $value) {
            if ($this->hasCast($key, $value)) {
                $value = $this->castAttribute($key, $value);
            }

            if (
                ! array_key_exists($key, $original) ||
                ($value !== $original[$key] && ! $this->originalIsNumericallyEquivalent($key))
            ) {
                $dirty[$key] = $value;
            }
        }

        return $dirty;
    }
598994
public function getRawHeaders()
    {
        $headers = [];

        foreach ($this->headers as $key => $value) {
            $headers[] = $key . ': ' . $value;
        }

        return $headers;
    }
1204969
public function getAllIndexes()
    {
        $result = [new Index('id', ['id'], IndexInterface::PRIMARY)];

        if ($this->getPolymorph()) {
            $result[] = new Index('type');
        }

        if (!empty($this->getIndexes())) {
            $result = array_merge($result, $this->getIndexes());
        }

        foreach ($this->getAssociations() as $assosication) {
            if ($assosication instanceof InjectIndexesInsterface) {
                $association_indexes = $assosication->getIndexes();

                if (!empty($association_indexes)) {
                    $result = array_merge($result, $association_indexes);
                }
            }
        }

        return $result;
    }
66221
public function toArray()
	{
		$result = parent::toArray();

		if (isset($result['suspended']))
		{
			$result['suspended'] = $this->getSuspendedAttribute($result['suspended']);
		}
		if (isset($result['banned']))
		{
			$result['banned'] = $this->getBannedAttribute($result['banned']);
		}
		if (isset($result['last_attempt_at']) and $result['last_attempt_at'] instanceof DateTime)
		{
			$result['last_attempt_at'] = $result['last_attempt_at']->format('Y-m-d H:i:s');
		}
		if (isset($result['suspended_at']) and $result['suspended_at'] instanceof DateTime)
		{
			$result['suspended_at'] = $result['suspended_at']->format('Y-m-d H:i:s');
		}

		return $result;
	}
1013719
public function asArray()
    {
        $array = [];

        foreach ($this as $key => $val) {
            if ($val instanceof self) {
                $val = $val->asArray();
            }
            $array[$key] = $val;
        }

        return $array;
    }
302527
public function asArray()
    {
        $headers = [];
        foreach (array_filter($this->storage) as $header => $value) {
            $headers[] = $header . ': ' . $value;
        }

        return $headers;
    }
463057
public function getDirections()
	{
		if($this->_directions===null)
		{
			$this->_directions=array();
			if(isset($_GET[$this->sortVar]) && is_string($_GET[$this->sortVar]))
			{
				$attributes=explode($this->separators[0],$_GET[$this->sortVar]);
				foreach($attributes as $attribute)
				{
					if(($pos=strrpos($attribute,$this->separators[1]))!==false)
					{
						$descending=substr($attribute,$pos+1)===$this->descTag;
						if($descending)
							$attribute=substr($attribute,0,$pos);
					}
					else
						$descending=false;

					if(($this->resolveAttribute($attribute))!==false)
					{
						$this->_directions[$attribute]=$descending;
						if(!$this->multiSort)
							return $this->_directions;
					}
				}
			}
			if($this->_directions===array() && is_array($this->defaultOrder))
				$this->_directions=$this->defaultOrder;
		}
		return $this->_directions;
	}
1034408
private function getHeaderArray() {
		$head = Array();
		$head[0] = $this->headerNames;
		$head = $this->getAttaches($head, $this->headerAttaches);
		return $head;
	}
930833
public function getDirty()
    {
        $dirty = [];

        foreach ($this->attributes as $key => $value) {
            if (! $this->originalIsEquivalent($key)) {
                // We need to reset the array's indices using array_values due to
                // LDAP requiring consecutive indices (0, 1, 2 etc.)
                $dirty[$key] = array_values($value);
            }
        }

        return $dirty;
    }
1121510
public function toArray(): array
    {
        return array_map(function (array $sortBy) {
            if (
                isset($sortBy['filter']) &&
                ($sortBy['filter'] instanceof Filter)
            ) {
                $sortBy['filter'] = $sortBy['filter']->toArray();
            }

            if (
                isset($sortBy['coordinate']) &&
                $sortBy['coordinate'] instanceof Coordinate
            ) {
                $sortBy['coordinate'] = $sortBy['coordinate']->toArray();
            }

            return $sortBy;
        }, $this->sortsBy);
    }
417298
public function toArray()
	{
		$list = parent::toArray();

		$list[$this->_prefix . 'parentid'] = $this->getParentId();
		$list[$this->_prefix . 'typeid'] = $this->getTypeId();
		$list[$this->_prefix . 'type'] = $this->getType();
		$list[$this->_prefix . 'domain'] = $this->getDomain();
		$list[$this->_prefix . 'refid'] = $this->getRefId();
		$list[$this->_prefix . 'datestart'] = $this->getDateStart();
		$list[$this->_prefix . 'dateend'] = $this->getDateEnd();
		$list[$this->_prefix . 'config'] = $this->getConfig();
		$list[$this->_prefix . 'position'] = $this->getPosition();
		$list[$this->_prefix . 'status'] = $this->getStatus();

		return $list;
	}