WordPress at a glance
function is not described

getid3_matroska::getEBMLelement() private WP 1.0

{} It's a method of the class: getid3_matroska{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->getEBMLelement( $element, $parent_end, $get_data );
$element(array) (required) (passed by reference — &)
-
$parent_end(int) (required)
-
$get_data *(array true false)*

Code of getid3_matroska::getEBMLelement() WP 5.7.2

<?php
private function getEBMLelement(&$element, $parent_end, $get_data=false) {
	if ($this->current_offset >= $parent_end) {
		return false;
	}

	if (!$this->EnsureBufferHasEnoughData()) {
		$this->current_offset = PHP_INT_MAX; // do not exit parser right now, allow to finish current loop to gather maximum information
		return false;
	}

	$element = array();

	// set offset
	$element['offset'] = $this->current_offset;

	// get ID
	$element['id'] = $this->readEBMLint();

	// get name
	$element['id_name'] = self::EBMLidName($element['id']);

	// get length
	$element['length'] = $this->readEBMLint();

	// get end offset
	$element['end'] = $this->current_offset + $element['length'];

	// get raw data
	$dont_parse = (in_array($element['id'], $this->unuseful_elements) || $element['id_name'] == dechex($element['id']));
	if (($get_data === true || (is_array($get_data) && !in_array($element['id'], $get_data))) && !$dont_parse) {
		$element['data'] = $this->readEBMLelementData($element['length'], $element);
	}

	return true;
}