public function hasPermission($key, $value)
    {
        $values = explode(',', $this->getPermission($key));

        return in_array($value, $values);
    }
public function hasPermission($key, $value)
    {
        $values = explode(',', $this->getPermission($key));

        return in_array($value, $values);
    }
public function hasPermission ( $ key , $ value ) { $ values = explode ( ',' , $ this -> getPermission ( $ key ) ) ; return in_array ( $ value , $ values ) ; }
Checks if an entity has a permission value for a key.

@param string $key   The key permission key
@param string $value The value to to check if permission has

@return bool
Checks if an entity has a permission value for a key .