Extracts metadata via FFProbe.

@return array
779997
public function readMetadata(): array
    {
        try {
            $ffprobe = FFProbe::create();

            return $ffprobe
                ->format($this->file->getPathname())
                ->all();
        } catch (ExecutableNotFoundException $e) {
            return [];
        }
    }
545080
function(cb) {
        if (!readMetadata) {
          return cb();
        }

        self.ffprobe(0, function(err, data) {
          if (!err) {
            self._ffprobeData = data;
          }

          cb();
        });
      }
107343
public function getApiAttributes() : array
    {
        $attributes = [];
        foreach ($this->getProperties() as $name => $property) {
            if (array_key_exists(FFCST::PROPERTY_OPTIONS, $property)) {
                if (!in_array(FFCST::OPTION_PK, $property[FFCST::PROPERTY_OPTIONS]) &&
                    !in_array(FFCST::OPTION_JSONIGNORE, $property[FFCST::PROPERTY_OPTIONS])) {
                    $getter = 'get' . \FreeFW\Tools\PBXString::toCamelCase($name, true);
                    if (array_key_exists(FFCST::PROPERTY_PUBLIC, $property)) {
                        $attributes[$property[FFCST::PROPERTY_PUBLIC]] = $this->$getter();
                    } else {
                        $attributes[$name] = $this->$getter();
                    }
                }
            } else {
                $getter = 'get' . \FreeFW\Tools\PBXString::toCamelCase($name, true);
                if (array_key_exists(FFCST::PROPERTY_PUBLIC, $property)) {
                    $attributes[$property[FFCST::PROPERTY_PUBLIC]] = $this->$getter();
                } else {
                    $attributes[$name] = $this->$getter();
                }
            }
        }
        return $attributes;
    }
448021
public function collectionMetadata()
    {
        $proto = $this->proto();
        $collectionIdent = $this->collectionIdent();

        if (!$collectionIdent) {
            $collectionIdent = $this->collectionIdentFallback();
        }

        if ($collectionIdent && $proto->view()) {
            $collectionIdent = $proto->render($collectionIdent);
        }

        if (!$collectionIdent) {
            return [];
        }

        $objMeta = $proto->metadata();

        if (isset($objMeta['admin']['lists'][$collectionIdent])) {
            return $objMeta['admin']['lists'][$collectionIdent];
        } else {
            return [];
        }
    }
406121
public function get_metadata_for_components() : array {
        // Get the metadata, and put into an assoc array indexed by component name.
        $metadata = [];
        foreach ($this->get_component_list() as $component) {
            $componentmetadata = $this->handled_component_class_callback($component, metadata_provider::class,
                'get_metadata', [new collection($component)]);
            if ($componentmetadata !== null) {
                $metadata[$component] = $componentmetadata;
            }
        }
        return $metadata;
    }
764420
public static function getMeta($refobj) {
        $fname = $refobj->getFileName();
        $lines = file_get_contents($fname);
        $file = new \SplFileObject($fname);
        $file->seek($refobj->getStartLine() - 2);
        $spos = $file->ftell();
        $file->seek($refobj->getEndLine() - 1);
        $epos = $file->ftell();
        unset($file);
        return array(
            'name' => $refobj->getName(),
            'code' => substr($lines, $spos, $epos - $spos)
        );
    }
81771
protected function readMetadata()
    {
        if ($this->metadata !== null) {
            return;
        }

        $line = fgets($this->getFileHandler());

        if (trim($line) !== '[') {
            throw new \InvalidArgumentException('Given file does not match expected pattern.');
        }

        $line = trim(fgets($this->getFileHandler()));
        $this->metadata = json_decode(rtrim($line, ','), true);
    }
1044707
public function getIds(): array {
        $this->loadMetadata();
        $ids = array();
        foreach ($this->metadata->allResources(RC::idProp()) as $i) {
            $ids[] = $i->getUri();
        }
        return $ids;
    }
1204875
public function getMetaData()
    {
        if (!$this->metadata) {
            $this->metadata = (new BlobMetadata())->init($this->blob->path);
        }

        return $this->metadata;
    }
1309370
private function getMetadataDirs()
    {
        if (null === $this->metadataDirs) {
            $this->metadataDirs = array();
            $bundles = $this->kernel->getBundles();
            $fs = new Filesystem();

            /**
             * @var string $bundleName
             * @var BundleInterface $bundle
             */
            foreach ($bundles as $bundleName => $bundle) {
                $directory = $this->kernel->locateResource("@$bundleName/Resources");
                $directory .= '/config/m7_encryption';
                if ($fs->exists($directory)) {
                    $nameSpace = $bundle->getNamespace();
                    $this->metadataDirs[$nameSpace] = $directory;
                }
            }
        }

        return $this->metadataDirs;
    }
511679
public function readMetadata(): array
    {
        try {
            $parser = new Parser();
            $pdf = $parser->parseFile($this->file->getPathname());

            return $pdf->getDetails();
        } catch (Exception $e) {
            return [];
        }
    }
1361449
protected function initMetadata() {
		if (! is_file($this->metadataPath)) {
			$this->metadata = [];
			
			return $this->metadata;
		}
		
		$metaRaw = file_get_contents($this->metadataPath);

		if ($metaRaw === false) {
			throw new Exceptions\MetadataError('Unable to read the metadata');
		}

		$meta = json_decode($metaRaw);

		if ($meta === null) {
			throw new Exceptions\MetadataError('Error in the metadata; Errorcode: ' . json_last_error());
		}

		$this->metadata = (array) $meta;

		return $this->metadata;
	}
423414
private function get_mf2meta() {
		$meta = get_post_meta( $this->uid );
		if ( ! $meta ) {
			return array();
		}
		if ( isset( $meta['response'] ) ) {
			$response = maybe_unserialize( $meta['response'] );
			// Retrieve from the old response array and store in new location.
			if ( ! empty( $response ) ) {
				$new = array();
				// Convert to new format and update.
				if ( ! empty( $response['title'] ) ) {
					$new['name'] = $response['title'];
				}
				if ( ! empty( $response['url'] ) ) {
					$new['url'] = $response['url'];
				}
				if ( ! empty( $response['content'] ) ) {
					$new['content'] = $response['content'];
				}
				if ( ! empty( $response['published'] ) ) {
					$new['published'] = $response['published'];
				}
				if ( ! empty( $response['author'] ) ) {
					$new['card']         = array();
					$new['card']['name'] = $response['author'];
					if ( ! empty( $response['icon'] ) ) {
						$new['card']['photo'] = $response['icon'];
					}
				}
				$new         = array_unique( $new );
				$new['card'] = array_unique( $new['card'] );
				if ( isset( $new ) ) {
					update_post_meta( $this->uid, 'mf2_cite', $new );
					delete_post_meta( $this->uid, 'response' );
					$meta['cite'] = $new;
				}
			}
		}
		foreach ( $meta as $key => $value ) {
			if ( ! self::str_prefix( $key, 'mf2_' ) ) {
				unset( $meta[ $key ] );
			} else {
				unset( $meta[ $key ] );
				$key = str_replace( 'mf2_', '', $key );
				// Do not save microput prefixed instructions
				if ( self::str_prefix( $key, 'mp-' ) ) {
					continue;
				}
				$value = array_map( 'maybe_unserialize', $value );
				if ( 1 === count( $value ) ) {
					$value = array_shift( $value );
				}
				if ( is_string( $value ) ) {
					$meta[ $key ] = array( $value );
				} else {
					$meta[ $key ] = $value;
				}
			}
		}
		return array_filter( $meta );
	}
114903
final public function getMetadata()
  {
    $item = Container::cache('target')->getItem('metadata');

    if (!$item->isHit()) {
      $metadata = [];
      $reflection = new \ReflectionClass($this);
      $interfaces = $reflection->getInterfaces();
      $reader = new AnnotationReader();

      foreach ($interfaces as $interface) {
        $methods = $interface->getMethods(\ReflectionMethod::IS_PUBLIC);
        foreach ($methods as $method) {
          $annotation = $reader->getMethodAnnotation($method, 'Drutiny\Annotation\Metadata');
          if (empty($annotation)) {
            continue;
          }
          $metadata[$annotation->name] = $method->name;
        }
      }
      Container::cache('target')->save($item->set($metadata));
    }
    return $item->get();
  }
991704
public function getMetadata($path)
    {
        $connection = $this->getConnection();

        if ($path === '') {
            return ['type' => 'dir', 'path' => ''];
        }

        if (@ftp_chdir($connection, $path) === true) {
            $this->setConnectionRoot();

            return ['type' => 'dir', 'path' => $path];
        }

        $listing = $this->ftpRawlist('-A', str_replace('*', '\\*', $path));

        if (empty($listing) || in_array('total 0', $listing, true)) {
            return false;
        }

        if (preg_match('/.* not found/', $listing[0])) {
            return false;
        }

        if (preg_match('/^total [0-9]*$/', $listing[0])) {
            array_shift($listing);
        }

        $filename = basename($path);
        $basePath = str_replace($filename, null, $path);
        $basePath = rtrim($basePath, '/');

        return $this->normalizeObject($listing[0], $basePath);
    }
145403
private function readRoutineMetadata(): array
  {
    $data = file_get_contents($this->metadataFilename);

    $routines = (array)json_decode($data, true);
    if (json_last_error()!=JSON_ERROR_NONE)
    {
      throw new RuntimeException("Error decoding JSON: '%s'.", json_last_error_msg());
    }

    return $routines;
  }
654459
public function getClassMetadata()
    {
        $class = $this->class;
        if ($this->classMetadata === null) {
            $classMetadata = $this->metadata->loadMetadataForClass($class);
            $this->classMetadata = $classMetadata;
        }

        return $this->classMetadata;
    }