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 /** * * Cube Framework $Id$ ia278+6n9+1tsq4/f5b9/6ywhG9n2wm71fQk4JxYIKc= ..
Decoded Output download
<?php
/**
*
* Cube Framework $Id$ ia278+6n9+1tsq4/f5b9/6ywhG9n2wm71fQk4JxYIKc=
*
* @link http://codecu.be/framework
* @copyright Copyright (c) 2014 CodeCube SRL
* @license http://codecu.be/framework/license Commercial License
*
* @version 1.0
*/
/**
* in array validator class
*/
namespace Cube\Validate;
class InArray extends AbstractValidate
{
protected $_message = "'%s' was not found in the haystack.";
/**
*
* array to compare the needle against
*
* @var array
*/
protected $_haystack = array();
/**
*
* class constructor
*
* initialize the haystack
*
* @param array $haystack
*/
public function __construct(array $haystack = null)
{
if ($haystack !== null) {
$this->setHaystack($haystack);
}
}
/**
*
* get haystack
*
* @return bool
*/
public function getHaystack()
{
return $this->_haystack;
}
/**
*
* set haystack
*
* @param array $haystack
* @return \Cube\Validate\InArray
*/
public function setHaystack(array $haystack)
{
$this->_haystack = $haystack;
return $this;
}
/**
*
* checks if the variable is contained in the haystack submitted
*
* @return bool return true if the validation is successful
*/
public function isValid()
{
if (!in_array($this->_value, $this->_haystack)) {
return false;
}
return true;
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
*
* Cube Framework $Id$ ia278+6n9+1tsq4/f5b9/6ywhG9n2wm71fQk4JxYIKc=
*
* @link http://codecu.be/framework
* @copyright Copyright (c) 2014 CodeCube SRL
* @license http://codecu.be/framework/license Commercial License
*
* @version 1.0
*/
/**
* in array validator class
*/
namespace Cube\Validate;
class InArray extends AbstractValidate
{
protected $_message = "'%s' was not found in the haystack.";
/**
*
* array to compare the needle against
*
* @var array
*/
protected $_haystack = array();
/**
*
* class constructor
*
* initialize the haystack
*
* @param array $haystack
*/
public function __construct(array $haystack = null)
{
if ($haystack !== null) {
$this->setHaystack($haystack);
}
}
/**
*
* get haystack
*
* @return bool
*/
public function getHaystack()
{
return $this->_haystack;
}
/**
*
* set haystack
*
* @param array $haystack
* @return \Cube\Validate\InArray
*/
public function setHaystack(array $haystack)
{
$this->_haystack = $haystack;
return $this;
}
/**
*
* checks if the variable is contained in the haystack submitted
*
* @return bool return true if the validation is successful
*/
public function isValid()
{
if (!in_array($this->_value, $this->_haystack)) {
return false;
}
return true;
}
}
Function Calls
None |
Stats
MD5 | 4638bd0b1600c2a8e4d79e14c88ec337 |
Eval Count | 0 |
Decode Time | 89 ms |