Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * @package Grav\Common\Media * * @copyright Copyright (c) 2015 - 2024 Tr..
Decoded Output download
<?php
/**
* @package Grav\Common\Media
*
* @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Media\Traits;
/**
* Trait VideoMediaTrait
* @package Grav\Common\Media\Traits
*/
trait VideoMediaTrait
{
use StaticResizeTrait;
use MediaPlayerTrait;
/**
* Allows to set the video's poster image
*
* @param string $urlImage
* @return $this
*/
public function poster($urlImage)
{
$this->attributes['poster'] = $urlImage;
return $this;
}
/**
* Allows to set the playsinline attribute
*
* @param bool $status
* @return $this
*/
public function playsinline($status = false)
{
if ($status) {
$this->attributes['playsinline'] = 'playsinline';
} else {
unset($this->attributes['playsinline']);
}
return $this;
}
/**
* Parsedown element for source display mode
*
* @param array $attributes
* @param bool $reset
* @return array
*/
protected function sourceParsedownElement(array $attributes, $reset = true)
{
$location = $this->url($reset);
return [
'name' => 'video',
'rawHtml' => '<source src="' . $location . '">Your browser does not support the video tag.',
'attributes' => $attributes
];
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* @package Grav\Common\Media
*
* @copyright Copyright (c) 2015 - 2024 Trilby Media, LLC. All rights reserved.
* @license MIT License; see LICENSE file for details.
*/
namespace Grav\Common\Media\Traits;
/**
* Trait VideoMediaTrait
* @package Grav\Common\Media\Traits
*/
trait VideoMediaTrait
{
use StaticResizeTrait;
use MediaPlayerTrait;
/**
* Allows to set the video's poster image
*
* @param string $urlImage
* @return $this
*/
public function poster($urlImage)
{
$this->attributes['poster'] = $urlImage;
return $this;
}
/**
* Allows to set the playsinline attribute
*
* @param bool $status
* @return $this
*/
public function playsinline($status = false)
{
if ($status) {
$this->attributes['playsinline'] = 'playsinline';
} else {
unset($this->attributes['playsinline']);
}
return $this;
}
/**
* Parsedown element for source display mode
*
* @param array $attributes
* @param bool $reset
* @return array
*/
protected function sourceParsedownElement(array $attributes, $reset = true)
{
$location = $this->url($reset);
return [
'name' => 'video',
'rawHtml' => '<source src="' . $location . '">Your browser does not support the video tag.',
'attributes' => $attributes
];
}
}
Function Calls
None |
Stats
MD5 | 356887bfa7b6db9d4533176f4ec5023b |
Eval Count | 0 |
Decode Time | 100 ms |