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 namespace Kanboard\Formatter; use Kanboard\Core\User\UserProviderInterface; use Ka..
Decoded Output download
<?php
namespace Kanboard\Formatter;
use Kanboard\Core\User\UserProviderInterface;
use Kanboard\Core\Filter\FormatterInterface;
/**
* Auto-complete formatter for users
*
* @package Kanboard\Formatter
* @author Frederic Guillot
*/
class UserAutoCompleteFormatter extends BaseFormatter implements FormatterInterface
{
/**
* Users found
*
* @access protected
* @var UserProviderInterface[]
*/
protected $users;
/**
* Set users
*
* @access public
* @param UserProviderInterface[] $users
* @return $this
*/
public function withUsers(array $users)
{
$this->users = $users;
return $this;
}
/**
* Format the users for the ajax auto-completion
*
* @access public
* @return array
*/
public function format()
{
$result = array();
foreach ($this->users as $user) {
$result[] = array(
'id' => $user->getInternalId(),
'username' => $user->getUsername(),
'external_id' => $user->getExternalId(),
'external_id_column' => $user->getExternalIdColumn(),
'value' => $user->getName() === '' ? $user->getUsername() : $user->getName(),
'label' => $user->getName() === '' ? $user->getUsername() : $user->getName().' ('.$user->getUsername().')',
);
}
return $result;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Kanboard\Formatter;
use Kanboard\Core\User\UserProviderInterface;
use Kanboard\Core\Filter\FormatterInterface;
/**
* Auto-complete formatter for users
*
* @package Kanboard\Formatter
* @author Frederic Guillot
*/
class UserAutoCompleteFormatter extends BaseFormatter implements FormatterInterface
{
/**
* Users found
*
* @access protected
* @var UserProviderInterface[]
*/
protected $users;
/**
* Set users
*
* @access public
* @param UserProviderInterface[] $users
* @return $this
*/
public function withUsers(array $users)
{
$this->users = $users;
return $this;
}
/**
* Format the users for the ajax auto-completion
*
* @access public
* @return array
*/
public function format()
{
$result = array();
foreach ($this->users as $user) {
$result[] = array(
'id' => $user->getInternalId(),
'username' => $user->getUsername(),
'external_id' => $user->getExternalId(),
'external_id_column' => $user->getExternalIdColumn(),
'value' => $user->getName() === '' ? $user->getUsername() : $user->getName(),
'label' => $user->getName() === '' ? $user->getUsername() : $user->getName().' ('.$user->getUsername().')',
);
}
return $result;
}
}
Function Calls
None |
Stats
MD5 | 7a6211cc13d2eea9a81b96473183d55e |
Eval Count | 0 |
Decode Time | 82 ms |