Jade\Compiler\CodeHandler::parseArray PHP Method

parseArray() protected method

protected parseArray ( $input, $subCodeHandler )
    protected function parseArray($input, $subCodeHandler)
    {
        $output = array();
        $key = '';
        $value = null;
        $addToOutput = $subCodeHandler->addToOutput($output, $key, $value);
        $consume = $subCodeHandler->consume();
        foreach ($input as $argument) {
            $argument = ltrim($argument, '$');
            $quote = null;
            while (preg_match('/^(.*?)(=>|[\'",:])/', $argument, $match)) {
                $this->parseArrayElement($argument, $match, $consume, $quote, $key, $value);
            }
            ${is_null($value) ? 'key' : 'value'} .= $argument;
            $addToOutput();
        }
        return 'array(' . implode(', ', $output) . ')';
    }