Create a php array object from the schema according to the data passed on.
Each line is a new object.

@param string      $content
@param Explanation $explanation
438336
public function decodeSchema($content, Explanation $explanation)
    {
        $data = [];
        $lines = str_getcsv($content, PHP_EOL);
        $header = array_shift($lines);
        $headers = array_filter(
          str_getcsv($header, ';'),
          function ($header) {
              return '' !== $header;
          }
        );

        foreach ($lines as $line) {
            $properties = str_getcsv($line, ';');
            $data[] = $this->buildObjectFromLine($properties, $headers, $explanation);
        }

        return $data;
    }
104421
protected function createErrorResponse($content = 'Unknown Error', $code = 500)
    {
        $data = [
            'message' => $content
        ];

        $response = $this->createJsonResponse($data, $code);
        return $response;
    }
972904
public function display($content, $data = []) {
        $this->content = $content;

        extract($data, EXTR_OVERWRITE);
        eval('?>' . $this->content);
    }
602774
public static function table(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("table", $content, $attributes);
    }
209733
private function resolveContent($content, array $matches)
    {
        if (3 < count($matches) && $content instanceof ContentSet) {
            return $this->resolveContentSet($content, $matches);
        }

        if (1 < count($matches) && is_object($content)) {
            $property = $matches[1];
            try {
                return $content->$property;
            } catch (\Exception $e) {
                return new Text();
            }
        }

        return $content;
    }
700525
public function addContent(string $content, string $contentType, ?string $charset = null): Message
    {
        $charset = $charset ?: $this->getCharset();

        $this->content[] = [
            'content'      => $content,
            'content_type' => $contentType,
            'charset'      => $charset
        ];

        return $this;
    }
575406
protected static function normalizeArray(array $content)
    {
        foreach ($content as $key => $value) {
            if ($value instanceof \SimpleXMLElement) {
                if ($value->count()) {
                    $content[$key] = static::normalizeArray((array) $value);
                } else {
                    $content[$key] = null;
                }
            } elseif (is_array($value)) {
                $content[$key] = static::normalizeArray($value);
            }
        }

        return $content;
    }
611906
public static function createSub($name = '', $content = null)
	{
		$class = get_called_class();
		$element = new $class($name, $content);
		$element->sub = true;
		return $element;
	}
1204704
public function convert($content, $from, $to)
    {
        if ( ! in_array($from, $this->inputFormats)) {
            throw new PandocException(
                sprintf('%s is not a valid input format for pandoc', $from)
            );
        }

        if ( ! in_array($to, $this->outputFormats)) {
            throw new PandocException(
                sprintf('%s is not a valid output format for pandoc', $to)
            );
        }

        file_put_contents($this->tmpFile, $content);

        $command = sprintf(
            '%s --from=%s --to=%s %s',
            $this->executable,
            $from,
            $to,
            $this->tmpFile
        );

        exec(escapeshellcmd($command), $output);

        return implode("\n", $output);
    }
572724
public function append($name, $content = null)
	{
		if (is_array($content)) {
			$first = $this->append($name, $content[0]);
			for ($i = 1; $i < count($content); $i++) {
				$this->append($name, $content[$i]);
			}
			return $first;
		}
		return $this->appendChild($this->newChild($name, $content));
	}
929942
protected function serialize($content)
    {
        if (!empty($content)) {
            if (is_object($content)) {
                $content = $this->serializer->serialize($content, 'json');
            }
        }

        return $content;
    }
760800
public function create($root, $attrs, $content = null)
    {
        $this->_buffer .= '<'.$root;
        
        if (!is_array($attrs)) {
            $content = $attrs;
            $attrs = [];
        }
        
        if ($attrs) {
            $attrs_str = [];
            foreach ($attrs as $name => $val)
                $attrs_str[] = $name . '="'.htmlspecialchars($val).'"';
            $this->_buffer .= ' ' . implode(' ', $attrs_str);
        }
        
        if (!$content) {
            $this->_buffer .= ' />';
        } else {
            $this->_buffer .= ">";
            
            if (is_string($content))
                $this->_buffer .= $content;
            elseif ($content instanceof \Closure)
                $this->_buffer .= $content();
            else
                throw new Exception\InvalidArgumentException(
                    sprintf('Expecting Closure or string as third argument, %s passed.', gettype($content))
                );
            
            $this->_buffer .= '</'.$root.'>';
        }
    }
936707
def explain(query)
      rows = []
      fetch_in_batch("EXPLAIN " + query) do |batch|
        rows << batch.map { |b| b[:Explain] }
      end
      ExplainResult.new(rows.flatten)
    end
1354888
public function parseRelease(&$content)
	{
		$release = new Release;
		$types = [];
		$lastType = '';
		$nameSet = false;

		$line = current($content);
		while ($line !== false)
		{
			$line = ltrim($line);

			if ($this->startsWith($line, '###'))
			{
				$type = $this->trimHashes($line);
				$types[$type] = [];
				$lastType = $type;
			}
			elseif ($nameSet &&
				$this->startsWith($line, '##') ||
				$this->startsWith($line, '[')
			)
			{
				prev($content);
				break;
			}
			elseif ($this->startsWith($line, '##'))
			{
				$this->handleName($release, $line);
				$nameSet = true;
			}
			else
			{
				$change = ltrim($line, "\t\n\r\0\x0B -");

				if ($change !== '')
				{
					$types[$lastType][] = $change;
				}
			}

			$line = next($content);
		}

		$release->setAllChanges($types);
		return $release;
	}
169030
public function fill($content)
    {
        if ($this->hasInstructions($content)) {
            $instructions = $this->getInstructions();
            foreach ($instructions as $instruction) {
                $content = $this->parseInstructions($content, $instruction);
            }
        }
        return $this->fillContent($content);
    }
278107
private function createEventFromResponseContent(array $content): Event
    {
        $type = $content['eventType'];
        $version = (int) $content['eventNumber'];
        $data = $content['data'];
        $metadata = (!empty($content['metadata'])) ? $content['metadata'] : null;
        $eventId = (!empty($content['eventId']) ? UUID::fromNative($content['eventId']) : null);

        return new Event($type, $version, $data, $metadata, $eventId);
    }
385791
def explain
      explanation = operation.selector.dup
      hint = explanation["$hint"]
      sort = explanation["$orderby"]
      max_scan = explanation["$maxScan"]
      explanation = {
        "$query" => selector,
        "$explain" => true,
      }
      explanation["$orderby"] = sort if sort
      explanation["$hint"] = hint if hint
      explanation["$maxScan"] = max_scan if max_scan
      Query.new(collection, explanation).limit(-(operation.limit.abs)).each { |doc| return doc }
    end