1. Go to this page and download the library: Download boxuk/describr library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
boxuk / describr example snippets
// ... add the line below to the end of the file
set_
/**
* Make sure that this plugin has everything that it needs - i.e. GD
*
* @throws UnmetDependencyException If a dependency is not met
*/
public function checkDependencies() {
if (!extension_loaded('gd') || !function_exists('gd_info')) {
throw new UnmetDependencyException('GD is not installed');
}
}
namespace BoxUK\Describr\Plugins\Custom;
/**
* Plugin for automatically describing XML files
*
* @package BoxUK\Describr\Plugins\BoxUK
* @author Box UK <[email protected]>
* @copyright Copyright (c) 2011, Box UK
* @license http://opensource.org/licenses/mit-license.php MIT License and http://www.gnu.org/licenses/gpl.html GPL license
* @link http://github.com/boxuk/describr
* @since 1.0.5
*/
class XmlPlugin extends \BoxUK\Describr\Plugins\AbstractPlugin
{
/**
* @return array Types of file this plugin can determine information about
*/
public function getMatchingMimeTypes() {
return array(
'text/xml'
);
}
/**
* @return array File extensions this plugin can determine information about.
* The "." is not
// ...
$this->describr = new \BoxUK\Describr\Facade();
$responseFromDescribr = $this->describr->describeFile($pathToFile);
bash
gavd@gavd-desktop:/opt/BoxUK/describr$ bin/describr tests/resources/test.mov
Analysing tests/resources/test.mov...
array(2) {
["BoxUK\General"]=>
*removed for brevity*
["BoxUK\AudioVideo\Iso14496Video"]=>
array(1) {
["errors"]=>
array(1) {
[0]=>
string(1236) "This plugin matched the file tests/resources/test.mov, but the dependencies could not be matched. Details:
exception 'BoxUK\Describr\Plugins\UnmetDependencyException' with message 'Class Zend_Media_Iso14496 is not loaded - please ensure the php-reader library is on the