This is now well supported by PHP and simplifies code, slightly.
I tested the code with PHP lint, so there should be no regressions.
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_name($name) {
if (!is_string($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_domain($domain) {
if (!is_string($domain)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'domain', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'domain', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_private($is_private = NULL) {
if (!is_null($is_private) && !is_bool($is_private)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_private', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_private', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
public function __construct() {
parent::__construct();
- $this->items = array();
+ $this->items = [];
}
/**
*/
public function set_items($array) {
if (!is_array($array)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'array', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'array', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_item_at($item, $key) {
if (!is_int($key) && !is_string($key)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'key', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'key', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->items)) {
- $this->items = array();
+ $this->items = [];
}
$this->items[$key] = $item;
*/
public function set_item_append($item) {
if (!is_array($this->items)) {
- $this->items = array();
+ $this->items = [];
}
$this->items[] = $item;
*/
public function set_items_serialized($serialized) {
if (!is_string($serialized)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'serialized', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'serialized', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
unset($unserialized);
- $this->items = array();
+ $this->items = [];
return new c_base_return_false();
}
*/
public function set_items_jsonized($jsonized, $associative = TRUE, $options = 0, $depth = 512) {
if (!is_string($jsonized)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'jsonized', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'jsonized', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($associative)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'associative', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'associative', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($depth) || $depth < 1) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
unset($decoded);
- $this->items = array();
+ $this->items = [];
return new c_base_return_false();
}
*/
public function get_items() {
if (!is_null($this->items) && !is_array($this->items)) {
- return c_base_return_array::s_new(array());
+ return c_base_return_array::s_new([]);
}
return c_base_return_array::s_new($this->items);
*/
public function get_item_at($key) {
if (!is_string($key) || empty($key)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'key', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'key', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_items_keys() {
if (empty($this->items)) {
- return array();
+ return [];
}
return array_keys($this->items);
*/
public function get_items_serialized() {
if (!is_array($this->items)) {
- return c_base_return_string::s_new(serialize(array()));
+ return c_base_return_string::s_new(serialize([]));
}
return c_base_return_string::s_new(serialize($this->items));
*/
public function get_items_jsonized($options = 0, $depth = 512) {
if (!is_int($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($depth)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($encoded === FALSE) {
unset($encoded);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'json_encode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'json_encode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public static function s_is_valid($charset) {
if (!is_int($charset)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'charset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'charset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_to_string($charset) {
if (!is_int($charset)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'charset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'charset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
return c_base_return_string::s_new('ISO-8859-16');
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '::' . __FUNCTION__), i_base_error_messages::FUNCTION_FAILURE));
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '::' . __FUNCTION__], i_base_error_messages::FUNCTION_FAILURE]);
return c_base_return_error::s_false($error);
}
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_name($name) {
if (!is_string($name) || empty($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (mb_strlen($name) == 0 || preg_match('/^(\w|-)+$/iu', $name) != 1) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'name', ':{expected_format}' => '. Alphanumeric and dash characters only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'name', ':{expected_format}' => '. Alphanumeric and dash characters only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
*/
public function set_secure($secure) {
if (!is_bool($secure)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'secure', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'secure', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$expires = (int) $expires;
if ($expires < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'expires', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'expires', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
else {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'expires', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'expires', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
$max_age = (int) $max_age;
if ($max_age < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'max_age', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'max_age', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
else {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'max_age', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'max_age', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
*/
public function set_path($path) {
if (!is_string($path) || empty($path)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$parsed = parse_url($path, PHP_URL_PATH);
if ($parsed === FALSE) {
unset($parsed);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'parse_url'), i_base_error_messages::OPERATION_FAILURE));
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'parse_url'], i_base_error_messages::OPERATION_FAILURE]);
return c_base_return_error::s_false($error);
}
*/
public function set_domain($domain) {
if (!is_string($domain) || empty($domain)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'domain', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'domain', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$parsed = parse_url('stub://' . $domain, PHP_URL_HOST);
if ($parsed === FALSE) {
unset($parsed);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'parse_url', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'parse_url', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function set_http_only($http_only) {
if (!is_bool($http_only)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'http_only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'http_only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_first_only($first_only) {
if (!is_bool($first_only)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'first_only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'first_only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_host_only($host_only) {
if (!is_bool($host_only)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'host_only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'host_only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_same_site($same_site) {
if (!is_int($same_site)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'same_site', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'same_site', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$this->same_site = $same_site;
break;
default:
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'same_site', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'same_site', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_cookie($checksum = TRUE) {
if (!is_bool($checksum)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_null($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
*/
public function set_json_encode_depth($json_encode_depth) {
if (!is_int($json_encode_depth) || $json_encode_depth < 1) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'json_encode_depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'json_encode_depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function do_push($checksum = TRUE, $force = FALSE) {
if (!is_bool($checksum)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($force)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'force', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'force', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_null($this->name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (is_null($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
unset($json);
if ($data === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'json_decode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'json_decode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function validate() {
if (!is_array($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->data')), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->data']], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
}
unset($checksum);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_build_checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_build_checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
private function p_build_checksum() {
if (!is_array($this->value)) {
- $this->value = array();
+ $this->value = [];
}
$has_checksum = array_key_exists('checksum', $this->value);
if (is_null($this->value['checksum'])) {
unset($this->value['checksum']);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_build_checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_build_checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
}
$json = json_encode($this->value, 0, $this->json_encode_depth);
if ($json === FALSE) {
unset($json);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'json_encode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'json_encode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function set_host($host) {
if (!is_string($host)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_host_addr($host_addr) {
if (!is_string($host_addr)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'host_addr', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'host_addr', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_string($port) && is_numeric($port)) {
$port = (int) $port;
if ($port < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'port', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'port', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
else {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'port', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'port', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
*/
public function set_database($database) {
if (!is_string($database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_user($user) {
if (!is_string($user)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_password($password) {
if (!is_null($password) && !is_string($password)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_string($connect_timeout) && is_numeric($connect_timeout)) {
$connect_timeout = (int) $connect_timeout;
if ($connect_timeout < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'connect_timeout', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'connect_timeout', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
else {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'connect_timeout', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'connect_timeout', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
*/
public function set_options($options) {
if (!is_string($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_ssl_mode($ssl_mode) {
if (!is_string($ssl_mode)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ssl_mode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ssl_mode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_service($service) {
if (!is_string($service)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'service', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'service', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public static function s_explode_array($array_string) {
if (!is_string($array_string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'array_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'array_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (mb_strlen($array_string) < 2) {
- return c_base_return_array::s_new(array());
+ return c_base_return_array::s_new([]);
}
$processed_string = mb_substr($array_string, 1);
*/
public function set_session($session) {
if (!is_object($session) || !($session instanceof c_base_session)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_connection_string($connection_string) {
if (!is_object($connection_string) || !($connection_string instanceof c_base_database_connection_string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'connection_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'connection_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_persistent($persistent) {
if (!is_bool($persistent)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'persistent', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'persistent', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_asynchronous($asynchronous) {
if (!is_bool($asynchronous)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'asynchronous', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'asynchronous', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function do_connect($force = FALSE) {
if (!is_bool($force)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'force', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'force', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_null($this->connection_string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'connection_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'connection_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_resource($this->database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_UNECESSARY);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_UNECESSARY);
return c_base_return_error::s_true($error);
}
$warnings = $handle_warnings->get_warnings();
unset($handle_warnings);
- $failure_reasons = array();
+ $failure_reasons = [];
if ($warnings instanceof c_base_return_array) {
$failure_reasons = $warnings->get_value_exact();
}
unset($warnings);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $this->connection_string->get_database()->get_value_exact(), ':{failure_reasons}' => $failure_reasons, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_CONNECTION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $this->connection_string->get_database()->get_value_exact(), ':{failure_reasons}' => $failure_reasons, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_CONNECTION_FAILURE);
unset($failure_reasons);
return c_base_return_error::s_false($error);
public function do_disconnect() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
return new c_base_return_true();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_close', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_close', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
public function do_flush() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
}
if ($result === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_flush', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_flush', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function is_busy() {
if (!$this->asynchronous) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->asynchronous', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->asynchronous', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
*/
public function get_parameter_status($name) {
if (!is_string($name) || empty($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_parameter_status($this->database, $name);
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_parameter_status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_parameter_status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_poll() {
if (!$this->asynchronous) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
public function do_reset() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
return new c_base_return_true();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_connection_reset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_connection_reset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
public function do_ping() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
return new c_base_return_false();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::FUNCTION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::FUNCTION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function escape_literal($literal) {
if (!is_string($literal)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'literal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'literal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
*/
public function escape_bytea($bytea) {
if (!is_string($bytea)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'bytea', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'bytea', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
*/
public function escape_identifier($identifier) {
if (!is_string($identifier)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'identifier', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'identifier', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
*/
public function unescape_bytea($bytea) {
if (!is_string($bytea)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'bytea', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'bytea', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
*/
public function set_client_encoding($encoding) {
if (!is_string($encoding)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
return new c_base_return_true();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_set_client_encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_set_client_encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
public function get_client_encoding() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
if ($encoding === FALSE) {
unset($encoding);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_client_encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_client_encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
public function consume_input() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
return new c_base_return_true();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_consume_input', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_consume_input', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_convert($table, $array, $options = 0) {
if (!is_string($table) || empty($table)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($array)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'array', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'array', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
$converted = pg_connect_status($this->database, $table, $array, $options);
if ($converted === FALSE) {
unset($converted);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_connect_status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_connect_status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
* @see: pg_prepare()
* @see: pg_send_prepare()
*/
- public function do_execute($name, $parameters = array()) {
+ public function do_execute($name, $parameters = []) {
if (!is_string($name) || empty($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($parameters)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameters', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameters', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
}
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => ($this->asynchronous ? 'pg_send_execute' : 'pg_execute'), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => ($this->asynchronous ? 'pg_send_execute' : 'pg_execute'), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
* @see: pg_prepare()
* @see: pg_send_prepare()
*/
- public function do_query($query, $parameters = array()) {
+ public function do_query($query, $parameters = []) {
if (!is_string($query) || empty($query)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
$result = new c_base_database_result();
$result->set_error($error);
}
if (!is_array($parameters)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameters', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameters', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
$result = new c_base_database_result();
$result->set_error($error);
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
$result = new c_base_database_result();
$result->set_error($error);
if ($this->asynchronous) {
if (empty($parameters)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_send_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_send_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
}
else {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_send_query_params', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_send_query_params', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
}
}
else {
if (empty($parameters)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
}
else {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_query_params', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_query_params', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
}
}
*/
public function do_prepare($name, $query) {
if (!is_string($name) || empty($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
$result = new c_base_database_result();
$result->set_error($error);
}
if (!is_string($query) || empty($query)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
$result = new c_base_database_result();
$result->set_error($error);
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
$result = new c_base_database_result();
}
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => ($this->asynchronous ? 'pg_send_prepare' :'pg_prepare'), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => ($this->asynchronous ? 'pg_send_prepare' :'pg_prepare'), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
$result = new c_base_database_result();
$result->set_error($error);
public function get_result() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
$result = new c_base_database_result();
}
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_get_result', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_get_result', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
$result = new c_base_database_result();
$result->set_error($error);
public function do_cancel() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
return new c_base_return_true();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_cancel_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_cancel_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_insert($table, $values, $options = NULL) {
if (!is_string($table) || empty($table)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($values)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'values', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'values', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($options) && !is_int($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
}
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_insert', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_insert', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
function do_update($table, $values, $conditions, $options = NULL) {
if (!is_string($table) || empty($table)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($values)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'values', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'values', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($conditions)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($options) && !is_int($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
}
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_update', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_update', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
function do_select($table, $conditions, $options = NULL) {
if (!is_string($table) || empty($table)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($conditions)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($options) && !is_int($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
}
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_select', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_select', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
function do_delete($table, $conditions, $options = NULL) {
if (!is_string($table) || empty($table)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($conditions)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($options) && !is_int($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
}
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_select', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_select', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function get_meta_data($table, $extended = FALSE) {
if (!is_string($table) || empty($table)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($extended)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'extended', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'extended', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_meta_data', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_meta_data', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
public function set_error_verbosity($verbosity) {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
if (!is_int($verbosity)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'verbosity', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'verbosity', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
public function get_last_error() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_last_error', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_last_error', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
public function get_last_notice() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_last_notice', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_last_notice', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
public function get_transaction_status() {
if (!is_resource($this->database)) {
$database = ($this->connection_string instanceof c_base_database_connection_string) ? $this->connection_string->get_database()->get_value_exact() : '';
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_name}' => $database, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_CONNECTION);
unset($database);
return c_base_return_error::s_false($error);
}
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_transaction_status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_transaction_status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function fetch_all_columns($column) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_int($column) || $column < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_fetch_all_columns($this->value, $column);
if ($result === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_fetch_all_columns', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_fetch_all_columns', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function fetch_all() {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
$result = pg_fetch_all($this->value);
if ($result === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_fetch_all', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_fetch_all', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function fetch_array($row = NULL, $type = PGSQL_ASSOC) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_null($row) && (!is_int($row) || $row < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_fetch_array($this->value, $row, $type);
if ($result === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_fetch_array', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_fetch_array', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function fetch_object($row = NULL, $class = NULL, $parameters = NULL) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_null($row) && (!is_int($row) || $row < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($class) && !is_string($class)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'class', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'class', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($parameters) && !is_array($parameters)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameters', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameters', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if ($result === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_fetch_object', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_fetch_object', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function fetch_result($row, $column) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_null($row) && (!is_int($row) || $row < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($column) && !is_string($column) || is_int($column) && $column < 0 || is_string($column) && empty($column)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_fetch_result', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_fetch_result', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function fetch_row($row = NULL) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_null($row) && (!is_int($row) || $row < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if ($result === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_fetch_row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_fetch_row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function error($code = NULL) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_null($code) && !is_int($code)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function affected_rows() {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
*/
public function number_of_rows() {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
$result = pg_num_rows($this->value);
if ($result < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_num_rows', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_num_rows', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function number_of_columns() {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
$result = pg_num_fields($this->value);
if ($result < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_num_fields', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_num_fields', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function field_name($number) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_int($number) || $number < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_field_name($this->value, $number);
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_field_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_field_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function field_number($name) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_string($name) || mb_strlen($name) == 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_field_number($this->value, $name);
if ($result < 0) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_field_number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_field_number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function field_length($row, $name_or_number) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_null($row) && (!is_int($row) || $row < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'row', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($name_or_number) && !(is_string($name_or_number) && mb_strlen($name) > 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name_or_number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name_or_number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_field_prtlen', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_field_prtlen', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function field_bytes($column) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_int($column) || $column < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_size($this->value, $column);
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_size', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_size', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function field_table($column, $oid = FALSE) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_int($column) || $column < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($oid)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'oid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'oid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_field_table($this->value, $column, $oid);
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_field_table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_field_table', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function field_type_oid($column) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_int($column) || $column < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_field_type_oid($this->value, $column);
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_field_type_oid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_field_type_oid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function last_oid() {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
$result = pg_last_oid($this->database);
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_last_oid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_last_oid', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function field_type($column) {
if (!is_resource($this->value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_NO_RESOURCE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_RESOURCE);
return c_base_return_error::s_false($error);
}
if (!is_int($column) || $column < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'column', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = pg_field_type($this->value, $column);
if ($result === FALSE) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'pg_field_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'pg_field_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
return new c_base_return_true();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::FUNCTION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::FUNCTION_FAILURE);
return c_base_return_error::s_false($error);
}
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function import($import) {
if (!is_string($import) || empty($import)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'import', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'import', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$decoded = json_decode($import, TRUE);
if (!is_array($decoded) || empty($decoded)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'json_decode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'json_decode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
// everything else has to be re-created on import for security reasons.
$encoded = json_encode($this->value);
if (!is_string($encoded)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'json_encode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'json_encode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
private function p_initialize() {
unset($this->value);
- $this->value = array();
+ $this->value = [];
}
}
*/
public static function s_set_debugging($debug) {
if (!is_bool($debug)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'debug', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'debug', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_bool($milliseconds)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'milliseconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'milliseconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_null($this->time_start) || is_null($this->time_stop)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->time_stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->time_stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
}
if (!is_int($option) || $option < 1 || $option > 3) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($megabytes)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'megabytes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'megabytes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($option == 1) {
if (is_null($this->memory_usage_peak)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->memory_usage_peak', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->memory_usage_peak', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
}
elseif ($option == 2) {
if (is_null($this->time_stop)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->time_stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->time_stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
}
else {
if (is_null($this->time_start)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->time_start', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->time_start', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (is_null($this->time_stop)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->time_stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->time_stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
// provide a language to fallback to if none is set.
const LANGUAGE_CLASS_DEFAULT = 'c_base_languages_us_only';
- // reserved path groups: array(97, 99, 100, 102, 109, 115, 116, 120, 121).
- const RESERVED_PATH_GROUP = array(c_base_ascii::LOWER_A, c_base_ascii::LOWER_C, c_base_ascii::LOWER_D, c_base_ascii::LOWER_F, c_base_ascii::LOWER_M, c_base_ascii::LOWER_S, c_base_ascii::LOWER_T, c_base_ascii::LOWER_U, c_base_ascii::LOWER_X);
+ // reserved path groups: [97, 99, 100, 102, 109, 115, 116, 120, 121].
+ const RESERVED_PATH_GROUP = [c_base_ascii::LOWER_A, c_base_ascii::LOWER_C, c_base_ascii::LOWER_D, c_base_ascii::LOWER_F, c_base_ascii::LOWER_M, c_base_ascii::LOWER_S, c_base_ascii::LOWER_T, c_base_ascii::LOWER_U, c_base_ascii::LOWER_X];
// default log facility (17 = c_base_error::FACILITY_LOCAL_0).
const LOG_FACILITY = 17;
*/
public static function s_set_timezone($timezone) {
if (!($timezone instanceof i_base_languages)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timezone', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timezone', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_set_languages($languages) {
if (!($languages instanceof i_base_languages)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_get_date($string, $timestamp = NULL) {
if (!is_string($string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_null($timestamp) && !is_float($timestamp) && !is_int($timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
unset($microseconds);
if (!($date instanceof \DateTime)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
$formatted = $date->format($string);
if (!is_string($formatted)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date->format', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date->format', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_get_timestamp($string, $format = 'Y/m/d h:i:s.u P') {
if (!is_string($string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
$date = \DateTime::createFromFormat($format, $string);
if (!($date instanceof \DateTime)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
$resulting_timestamp = $date->getTimestamp();
if (!is_int($resulting_timestamp) && !is_float($resulting_timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date->get_timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date->get_timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
* @see: https://tools.ietf.org/html/rfc7231#section-5.5.1
*/
private static function p_parse_email_full($email) {
- $result = array(
- 'emails' => array(),
+ $result = [
+ 'emails' => [],
'invalid' => FALSE,
- );
+ ];
- $processed = array();
+ $processed = [];
$group = NULL;
$group_id = NULL;
$process_machine_part = FALSE;
// if the proper stop point was reached, then the '<' is a valid opening.
if ($parsed['stopped_at'] && !$parsed['invalid'] && !empty($parsed['name_machine'])) {
$name_machine = $parsed['name_machine'] . '@' . $parsed['name_address'];
- $result['emails'][$name_machine] = array(
+ $result['emails'][$name_machine] = [
'name_human' => $name_human,
'name_machine' => $name_machine,
'name_address' => $parsed['name_address'],
- );
+ ];
$current_chunk_start = $current + 1;
$is_named_machine = TRUE;
// if the proper stop point was reached, then a valid machine name was found.
if ($parsed['stopped_at'] && !$parsed['invalid'] && !empty($parsed['name_machine'])) {
$name_machine = $parsed['name_machine'] . '@' . $parsed['name_address'];
- $result['emails'][$name_machine] = array(
+ $result['emails'][$name_machine] = [
'name_human' => $name_human,
'name_machine' => $name_machine,
'name_address' => $parsed['name_address'],
- );
+ ];
$current_chunk_start = $current + 1;
* - For example, if execution was stopped on an unexpected brace, the location would be the position of that specific brace.
*/
private static function p_parse_email_machine($email_codes, $email_characters, $start = NULL, $stop = NULL, $stop_at = FALSE) {
- $result = array(
+ $result = [
'name_machine' => '',
'name_address' => '',
'invalid' => FALSE,
'current' => 0,
'stopped_at' => FALSE,
- );
+ ];
if (!is_null($start)) {
$result['current'] = $start;
$this->limit = self::DEFAULT_BACKTRACE_LIMIT;
$this->recovered = FALSE;
- $this->backtrace = array();
+ $this->backtrace = [];
$this->backtrace_perform = FALSE;
$this->ignore_arguments = TRUE;
$entry->set_details($details);
}
elseif (is_null($details)) {
- $entry->set_details(array());
+ $entry->set_details([]);
}
if (is_int($code)) {
$this->p_backtrace($count + 1);
}
elseif ($count === FALSE) {
- $this->backtrace = array();
+ $this->backtrace = [];
}
else {
return FALSE;
return;
}
- $this->backtrace = array();
+ $this->backtrace = [];
// when limit is set to FALSE, backtrace is disabled.
if ($this->limit === FALSE) {
*/
public function set_id($id) {
if (!is_int($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_id_creator($id_creator) {
if (!is_int($id_creator)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_creator', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_creator', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_id_creator_session($id_creator_session) {
if (!is_int($id_creator_session)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_creator_session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_creator_session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_id_type($id_type) {
if (!is_int($id_type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_id_group($id_group) {
if (!is_null($id_group) && !is_int($id_group)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_group', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_group', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_name_machine($name_machine) {
if (!is_string($name_machine)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name_machine', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name_machine', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_name_human($name_human) {
if (!is_string($name_human)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name_human', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name_human', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_name_extension($name_extension) {
if (!is_string($name_extension)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name_extension', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name_extension', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_field_size($field_size) {
if (!is_int($field_size)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'field_size', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'field_size', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_field_width($field_width) {
if (!is_null($field_width) && !is_int($field_width)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'field_width', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'field_width', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_field_height($field_height) {
if (!is_null($field_height) && !is_int($field_height)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'field_height', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'field_height', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_created($date_created) {
if (!is_int($date_created) && !is_float($date_created)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_created', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_created', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_changed($date_changed) {
if (!is_int($date_changed) && !is_float($date_changed)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_changed', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_changed', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_locked($date_locked) {
if (!is_int($date_locked) && !is_float($date_locked)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_deleted($date_deleted) {
if (!is_int($date_deleted) && !is_float($date_deleted)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_field($field_name) {
if (is_null($field_name)) {
- $this->fields = array();
+ $this->fields = [];
return new c_base_return_true();
}
if (!is_string($field_name) || empty($field_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'field_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'field_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->fields)) {
- $this->fields = array();
+ $this->fields = [];
}
$this->fields[$field_name] = $field_name;
*/
public function unset_field($field_name) {
if (!is_string($field_name) && !empty($field_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'field_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'field_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_fields() {
if (!is_array($this->fields)) {
- $this->fields = array();
+ $this->fields = [];
}
return c_base_return_array::s_new($this->fields);
*/
public function set_argument($index, $value) {
if (!is_string($index) && !empty($index)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->arguments)) {
- $this->arguments = array();
+ $this->arguments = [];
}
$this->arguments[$index] = $value;
*/
public function get_argument($index) {
if (!is_string($index) && !empty($index)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->arguments)) {
- $this->arguments = array();
+ $this->arguments = [];
}
if (!array_key_exists($index, $this->arguments)) {
*/
public function get_arguments() {
if (!is_array($this->arguments)) {
- $this->arguments = array();
+ $this->arguments = [];
}
return c_base_return_array::s_new($this->arguments);
$this->id = NULL;
- $this->attributes = array();
- $this->attributes_body = array();
+ $this->attributes = [];
+ $this->attributes_body = [];
- $this->headers = array();
- $this->body = array();
+ $this->headers = [];
+ $this->body = [];
}
/**
*/
public static function sanitize_css($text, $partial = FALSE) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_bool($partial)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'partial', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'partial', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
}
unset($sanitized);
- $error = c_base_error::s_log(' ' . $response['error']['message'], array('arguments' => array(':{operation_name}' => 'preg_replace', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(' ' . $response['error']['message'], ['arguments' => [':{operation_name}' => 'preg_replace', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public function set_id($id) {
if (!is_int($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_attribute($attribute, $value) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_attribute_body($attribute, $value) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_tag($tag, $delta = NULL) {
if (!($tag instanceof c_base_markup_tag)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'tag', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'tag', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($delta) && !is_int($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->body)) {
- $this->body = array();
+ $this->body = [];
}
if (is_null($delta)) {
*/
public function set_header($header, $delta = NULL) {
if (!($header instanceof c_base_markup_tag)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'header', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'header', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($delta) && !is_int($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_array($this->headers)) {
- $this->headers = array();
+ $this->headers = [];
}
if (is_null($delta)) {
*/
public function get_attributes() {
if (!isset($this->attributes) && !is_array($this->attributes)) {
- $this->attributes = array();
+ $this->attributes = [];
}
return c_base_return_array::s_new($this->attributes);
*/
public function get_attribute($attribute) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_attribute_body($attribute) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_tag($delta) {
if (!is_int($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_body() {
if (!is_array($this->body)) {
- return c_base_return_array::s_new(array());
+ return c_base_return_array::s_new([]);
}
return c_base_return_array::s_new($this->body);
*/
public function get_header($delta) {
if (!is_int($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_headers() {
if (!is_array($this->headers)) {
- return c_base_return_array::s_new(array());
+ return c_base_return_array::s_new([]);
}
return c_base_return_array::s_new($this->headers);
if (is_string($value)) {
if ($body) {
if (!isset($this->attributes_body[$attribute])) {
- $this->attributes_body[$attribute] = array();
+ $this->attributes_body[$attribute] = [];
}
$this->attributes_body[$attribute][] = $value;
}
else {
if (!isset($this->attributes[$attribute])) {
- $this->attributes[$attribute] = array();
+ $this->attributes[$attribute] = [];
}
$this->attributes[$attribute][] = $value;
private function p_get_attribute($attribute, $body = FALSE) {
if ($body) {
if (!isset($this->attributes_body) && !is_array($this->attributes_body)) {
- $this->attributes_body = array();
+ $this->attributes_body = [];
}
}
else {
if (!isset($this->attributes) && !is_array($this->attributes)) {
- $this->attributes = array();
+ $this->attributes = [];
}
}
$this->headers = NULL;
$this->headers_sent = FALSE;
- $this->request = array();
+ $this->request = [];
$this->request_time = NULL;
- $this->response = array();
+ $this->response = [];
$this->request_uri_relative = NULL;
$this->request_uri_query = NULL;
*/
public function get_request($header_name = NULL, $delta = NULL) {
if (!is_null($header_name) && !is_int($header_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($delta) && !is_int($delta) && !is_string($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!array_key_exists($header_name, $this->request)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => $header_name, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => $header_name, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
return c_base_return_value::s_new($this->request[$header_name]['data'][$delta]);
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => $delta, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => $delta, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
*/
public function get_request_headers() {
if (!is_array($this->headers)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{data_name}' => 'request headers', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_DEFINED);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{data_name}' => 'request headers', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_DEFINED);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->headers);
*/
public function get_request_uri_relative($base_path, $with_query = FALSE) {
if (!is_string($base_path)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'base_path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'base_path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_bool($with_query)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'with_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'with_query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public function get_request_uri_query($base_path) {
if (!is_string($base_path)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'base_path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'base_path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public function get_response($header_name = NULL, $delta = NULL) {
if (!is_null($header_name) && !is_int($header_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($delta) && !is_int($delta) && !is_string($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!array_key_exists($header_name, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => $header_name, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => $header_name, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
return c_base_return_value::s_new($this->response[$header_name][$delta]);
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => $delta, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => $delta, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
*/
public function set_languages($class_name) {
if (!(is_string($class_name) && is_subclass_of('i_base_languages', $class_name)) || !(is_object($class_name) && $class_name instanceof i_base_languages)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'class_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'class_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
// force the request array to be defined.
- $this->request = array();
+ $this->request = [];
- $initialize_keys = array(
+ $initialize_keys = [
static::REQUEST_ACCEPT,
static::REQUEST_ACCEPT_CHARSET,
static::REQUEST_ACCEPT_ENCODING,
static::REQUEST_CHECKSUM_HEADER,
static::REQUEST_CHECKSUM_HEADERS,
static::REQUEST_CHECKSUM_CONTENT,
- );
+ ];
foreach ($initialize_keys as $initialize_key) {
- $this->request[$initialize_key] = array(
+ $this->request[$initialize_key] = [
'defined' => FALSE,
'invalid' => FALSE,
- 'data' => array(
- ),
- );
+ 'data' => [
+ ],
+ ];
}
unset($initialize_key);
unset($initialize_keys);
$headers = array_flip(array_keys($this->headers));
// additional keys for specific cases.
- $this->request[static::REQUEST_ACCEPT]['types'] = array();
+ $this->request[static::REQUEST_ACCEPT]['types'] = [];
if (array_key_exists('accept', $this->headers)) {
*/
public function select_language($supported_languages) {
if (!is_array($supported_languages) || empty($supported_languages)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'supported_languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'supported_languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
if (isset($this->request[static::REQUEST_ACCEPT_LANGUAGE]['data']) && is_array($this->request[static::REQUEST_ACCEPT_LANGUAGE]['data'])) {
if (isset($this->request[static::REQUEST_ACCEPT_LANGUAGE]['invalid']) && $this->request[static::REQUEST_ACCEPT_LANGUAGE]['invalid']) {;
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'supported_languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'supported_languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value($language_chosen, 'c_base_return_int', $error);
}
*/
public function set_response_access_control_allow_origin($uri) {
if (!is_string($uri)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($uri == c_base_ascii::ASTERISK) {
- $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN] = array('wildcard' => TRUE);
+ $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN] = ['wildcard' => TRUE];
}
else {
$text = $this->pr_rfc_string_prepare($uri);
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($parsed['invalid']) {
unset($parsed);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'uri', ':{expected_format}' => NULL, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'uri', ':{expected_format}' => NULL, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed['invalid']);
*/
public function set_response_access_control_allow_credentials($allow_credentials) {
if (!is_bool($allow_credentials)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'allowed_credentials', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'allowed_credentials', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_access_control_expose_headers($header_name, $append = TRUE) {
if (!is_string($header_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_token === FALSE) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($append) {
if (!isset($this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS]) || !is_array($this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS])) {
- $this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS] = array();
+ $this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS] = [];
}
$this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS][$prepared_token] = $prepared_token;
}
else {
- $this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS] = array($prepared_token => $prepared_token);
+ $this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS] = [$prepared_token => $prepared_token];
}
unset($prepared_token);
*/
public function set_response_access_control_max_age($seconds) {
if (!is_int($seconds) && !is_float($seconds)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_access_control_allow_methods($method, $append = TRUE) {
if (!is_int($method)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'method', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'method', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
break;
default:
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'method', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'method', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($append) {
if (!isset($this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS]) || !is_array($this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS])) {
- $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS] = array();
+ $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS] = [];
}
$this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS][$method] = $method;
}
else {
- $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS] = array($method => $method);
+ $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS] = [$method => $method];
}
return new c_base_return_true();
*/
public function set_response_access_control_allow_headers($header_name, $append = TRUE) {
if (!is_string($header_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_token === FALSE) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($append) {
if (!isset($this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS]) || !is_array($this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS])) {
- $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS] = array();
+ $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS] = [];
}
$this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS][$prepared_token] = $prepared_token;
}
else {
- $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS] = array($prepared_token => $prepared_token);
+ $this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS] = [$prepared_token => $prepared_token];
}
unset($prepared_token);
*/
public function set_response_accept_patch($media_type, $append = TRUE) {
if (!is_string($media_type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'media_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'media_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($parsed['invalid']) {
unset($parsed);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'media type', ':{expected_format}' => '1*(tchar) "/" 1*(tchar) *(*(wsp) ";" *(wsp) 1*(1*(tchar) *(wsp) "=" *(wsp) 1*(tchar) / (quoted-string)))', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'media type', ':{expected_format}' => '1*(tchar) "/" 1*(tchar) *(*(wsp) ";" *(wsp) 1*(1*(tchar) *(wsp) "=" *(wsp) 1*(tchar) / (quoted-string)))', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed['invalid']);
if ($append) {
if (!isset($this->response[static::RESPONSE_ACCEPT_PATCH]) || !is_array($this->response[static::RESPONSE_ACCEPT_PATCH])) {
- $this->response[static::RESPONSE_ACCEPT_PATCH] = array();
+ $this->response[static::RESPONSE_ACCEPT_PATCH] = [];
}
$this->response[static::RESPONSE_ACCEPT_PATCH][] = $parsed;
}
else {
- $this->response[static::RESPONSE_ACCEPT_PATCH] = array($parsed);
+ $this->response[static::RESPONSE_ACCEPT_PATCH] = [$parsed];
}
unset($parsed);
*/
public function set_response_accept_ranges($ranges) {
if (!is_string($ranges)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ranges', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ranges', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_token === FALSE) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function set_response_age($seconds) {
if (!is_int($seconds)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_allow($allow, $append = TRUE) {
if (!is_int($allow)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'allow', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'allow', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
case static::HTTP_METHOD_DEBUG:
break;
default:
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'allow', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'allow', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($allow == static::HTTP_METHOD_NONE) {
- $this->response[static::RESPONSE_ALLOW] = array($allow => $allow);
+ $this->response[static::RESPONSE_ALLOW] = [$allow => $allow];
return new c_base_return_true();
}
if ($append) {
if (!isset($this->response[static::RESPONSE_ALLOW]) || !is_array($this->response[static::RESPONSE_ALLOW])) {
- $this->response[static::RESPONSE_ALLOW] = array();
+ $this->response[static::RESPONSE_ALLOW] = [];
}
$this->response[static::RESPONSE_ALLOW][$allow] = $allow;
}
else {
- $this->response[static::RESPONSE_ALLOW] = array($allow => $allow);
+ $this->response[static::RESPONSE_ALLOW] = [$allow => $allow];
}
return new c_base_return_true();
*/
public function set_response_cache_control($directive_name, $directive_value = NULL, $append = TRUE) {
if (!is_int($directive_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'directive_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directive_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($directive_value) && !is_string($directive_value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'directive_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directive_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
break;
default:
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'directive_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directive_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($parsed['invalid']) {
unset($parsed);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'directive value', ':{expected_format}' => '1*(tchar) *("=" 1*(1*(tchar) / quoted-string) *(*(wsp) "," *(wsp) 1*(tchar) *("=" 1*(1*(tchar) / quoted-string))', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'directive value', ':{expected_format}' => '1*(tchar) *("=" 1*(1*(tchar) / quoted-string) *(*(wsp) "," *(wsp) 1*(tchar) *("=" 1*(1*(tchar) / quoted-string))', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed);
if ($append) {
if (!isset($this->response[static::RESPONSE_CACHE_CONTROL]) || !is_array($this->response[static::RESPONSE_CACHE_CONTROL])) {
- $this->response[static::RESPONSE_CACHE_CONTROL] = array();
+ $this->response[static::RESPONSE_CACHE_CONTROL] = [];
}
$this->response[static::RESPONSE_CACHE_CONTROL][$directive_name] = $directive_value;
}
else {
- $this->response[static::RESPONSE_CACHE_CONTROL] = array($directive_name => $directive_value);
+ $this->response[static::RESPONSE_CACHE_CONTROL] = [$directive_name => $directive_value];
}
unset($parsed_directive_value);
*/
public function set_response_connection($connection_option, $append = TRUE) {
if (!is_string($connection_option)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'connection_option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'connection_option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_token === FALSE) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($append) {
if (!isset($this->response[static::RESPONSE_CONNECTION]) || !is_array($this->response[static::RESPONSE_CONNECTION])) {
- $this->response[static::RESPONSE_CONNECTION] = array();
+ $this->response[static::RESPONSE_CONNECTION] = [];
}
$this->response[static::RESPONSE_CONNECTION][$prepared_token] = $prepared_token;
}
else {
- $this->response[static::RESPONSE_CONNECTION] = array($prepared_token => $prepared_token);
+ $this->response[static::RESPONSE_CONNECTION] = [$prepared_token => $prepared_token];
}
unset($prepared_token);
*/
public function set_response_content($content, $append = TRUE, $is_file = FALSE) {
if (!is_string($content)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($is_file)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_file', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_file', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$this->content[] = $content;
}
else {
- $this->content = array($content);
+ $this->content = [$content];
}
if ($is_file) {
$this->content_is_file = TRUE;
- $this->content = array($content);
+ $this->content = [$content];
}
else {
$this->content_is_file = FALSE;
*/
public function set_response_content_disposition($type, $parameter_name = NULL, $parameter_value = NULL, $append = TRUE) {
if (!is_null($type) && !is_string($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($parameter_name) && !is_string($parameter_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($parameter_value) && !is_string($parameter_value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_token === FALSE) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'content disposition type', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'content disposition type', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
if (empty($prepared_token)) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if ($prepared_parameter_name === FALSE) {
unset($prepared_parameter_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'content disposition parameter name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'content disposition parameter name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
if (empty($prepared_parameter_name)) {
unset($prepared_parameter_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
unset($parsed_parameter_value);
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'disposition parameter value', ':{expected_format}' => '1*(tchar) / 1*(quoted-string)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'disposition parameter value', ':{expected_format}' => '1*(tchar) / 1*(quoted-string)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed_parameter_value['invalid']);
if (is_null($type)) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CONTENT_DISPOSITION] = array(
+ $this->response[static::RESPONSE_CONTENT_DISPOSITION] = [
'type' => NULL,
- 'parameters' => array(),
- );
+ 'parameters' => [],
+ ];
}
if (is_string($type)) {
$this->response[static::RESPONSE_CONTENT_DISPOSITION]['parameters'][$prepared_parameter_name] = $parsed_parameter_value['text'];
}
else {
- $this->response[static::RESPONSE_CONTENT_DISPOSITION]['parameters'] = array($prepared_parameter_name => $parsed_parameter_value['text']);
+ $this->response[static::RESPONSE_CONTENT_DISPOSITION]['parameters'] = [$prepared_parameter_name => $parsed_parameter_value['text']];
}
}
unset($prepared_parameter_name);
*/
public function set_response_content_encoding($encoding, $append = TRUE) {
if (!is_int($encoding)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
case static::ENCODING_PG:
break;
default:
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$this->response[static::RESPONSE_CONTENT_ENCODING][] = $encoding;
}
else {
- $this->response[static::RESPONSE_CONTENT_ENCODING] = array($encoding);
+ $this->response[static::RESPONSE_CONTENT_ENCODING] = [$encoding];
}
return new c_base_return_true();
*/
public function set_response_content_language($language = NULL, $append = TRUE) {
if (!is_null($language) && !is_int($language)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'language', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'language', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($default instanceof c_base_return_false) {
unset($default);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->languages->s_get_default_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->languages->s_get_default_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CONTENT_LANGUAGE] = array($default->get_value_exact());
+ $this->response[static::RESPONSE_CONTENT_LANGUAGE] = [$default->get_value_exact()];
unset($default);
}
else {
if ($this->languages->s_get_names_by_id($language) instanceof c_base_return_false) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->languages->s_get_names_by_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->languages->s_get_names_by_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if (!isset($this->response[static::RESPONSE_CONTENT_LANGUAGE])) {
- $this->response[static::RESPONSE_CONTENT_LANGUAGE] = array();
+ $this->response[static::RESPONSE_CONTENT_LANGUAGE] = [];
}
$this->response[static::RESPONSE_CONTENT_LANGUAGE][] = $language;
*/
public function set_response_content_length($length = NULL, $force = FALSE) {
if (!is_null($length) && !is_int($length) || $length < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($force)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'force', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'force', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!file_exists($filename)) {
unset($filename);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
*/
public function set_response_content_range($start, $stop, $total) {
if (!is_int($start) && $start !== FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'start', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'start', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($stop) && $stop !== FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'stop', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($total) && $total !== FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'total', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'total', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
// unsatisfiable requires a total to be specified.
if (($start === FALSE || $stop === FALSE) && $total === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'total', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'total', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CONTENT_RANGE] = array(
+ $this->response[static::RESPONSE_CONTENT_RANGE] = [
'total' => $total,
'type' => 'bytes',
- 'range' => array(
+ 'range' => [
'start' => $start,
'stop' => $stop,
- )
- );
+ ],
+ ];
if ($start === FALSE || $stop === FALSE) {
$this->response[static::RESPONSE_CONTENT_RANGE]['range'] = FALSE;
$result = c_base_mime::s_get_names_by_id($content_type);
if ($result instanceof c_base_return_false) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'content_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'content_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
unset($result);
}
elseif (!is_string($content_type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'content_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'content_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
else {
$result = c_base_mime::s_identify($content_type, TRUE);
if ($result instanceof c_base_return_false) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'content_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'content_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!c_base_charset::s_is_valid($charset)) {
unset($content_type_string);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'charset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'charset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CONTENT_TYPE] = array(
+ $this->response[static::RESPONSE_CONTENT_TYPE] = [
'type' => $content_type_string,
'charset' => $charset,
- );
+ ];
unset($content_type_string);
return new c_base_return_true();
}
if (!is_int($timestamp) && !is_float($timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_int($timestamp) && !is_float($timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_etag($entity_tag = NULL, $weak = FALSE) {
if (!is_null($entity_tag) && !is_string($entity_tag) && $entity_tag !== FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'entity_tag', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'entity_tag', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $response = array(
+ $response = [
'tag' => '',
'weak' => FALSE,
- );
+ ];
if (is_null($entity_tag)) {
unset($hash);
unset($response);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
unset($hash);
unset($response);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
}
*/
public function set_response_expires($timestamp) {
if (!is_int($timestamp) && !is_float($timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_last_modified($timestamp) {
if (!is_int($timestamp) && !is_float($timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_link($uri, $parameter_name = NULL, $parameter_value = NULL, $append = TRUE) {
if (!is_string($uri)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($parameter_name) && !is_string($parameter_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($parameter_value) && !is_string($parameter_value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($parsed_uri['invalid']) {
unset($parsed_uri);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'link uri', ':{expected_format}' => '(uri)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'link uri', ':{expected_format}' => '(uri)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed_uri['invalid']);
// when append is FALSE and there is no parameter name, then assign url instead of appending url.
if (!$append && is_null($parameter_name)) {
if (!isset($this->response[static::RESPONSE_LINK])) {
- $this->response[static::RESPONSE_LINK] = array();
+ $this->response[static::RESPONSE_LINK] = [];
}
- $this->response[static::RESPONSE_LINK][$uri] = array(
+ $this->response[static::RESPONSE_LINK][$uri] = [
'uri' => $parsed_uri,
- 'parameters' => array(),
- );
+ 'parameters' => [],
+ ];
unset($parsed_uri);
return new c_base_return_true();
if ($prepared_parameter_name === FALSE) {
unset($prepared_parameter_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'link parameter name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'link parameter name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
if (empty($prepared_parameter_name)) {
unset($prepared_parameter_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
unset($text);
unset($parsed_uri);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
unset($parsed_parameter_value);
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'content disposition parameter value', ':{expected_format}' => '1*(tchar) / 1*(quoted-string)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'content disposition parameter value', ':{expected_format}' => '1*(tchar) / 1*(quoted-string)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed_parameter_value['invalid']);
if (!isset($this->response[static::RESPONSE_LINK])) {
- $this->response[static::RESPONSE_LINK] = array();
+ $this->response[static::RESPONSE_LINK] = [];
}
if (!array_key_exists($uri, $this->response[static::RESPONSE_LINK])) {
- $this->response[static::RESPONSE_LINK][$uri] = array(
+ $this->response[static::RESPONSE_LINK][$uri] = [
'uri' => $parsed_uri,
- 'parameters' => array()
- );
+ 'parameters' => []
+ ];
}
unset($parsed_uri);
$this->response[static::RESPONSE_LINK][$uri]['parameters'][$prepared_parameter_name] = $parsed_parameter_value['text'];
}
else {
- $this->response[static::RESPONSE_LINK][$uri]['parameters'] = array($prepared_parameter_name => $parsed_parameter_value['text']);
+ $this->response[static::RESPONSE_LINK][$uri]['parameters'] = [$prepared_parameter_name => $parsed_parameter_value['text']];
}
}
unset($prepared_parameter_name);
*/
public function set_response_location($uri) {
if (!is_string($uri) && !is_array($uri)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
unset($parts);
unset($combined);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'URI or URL', ':{expected_format}' => 'URI or URL', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'URI or URL', ':{expected_format}' => 'URI or URL', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($combined);
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($parsed['invalid']) {
unset($parsed);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'uri', ':{expected_format}' => NULL, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'uri', ':{expected_format}' => NULL, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed['invalid']);
*/
public function set_response_pragma($parameter_name, $parameter_value = NULL, $append = TRUE) {
if (!is_string($parameter_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($parameter_value) && !is_string($parameter_value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_parameter_name === FALSE) {
unset($prepared_parameter_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'pragma parameter name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'pragma parameter name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
if (empty($prepared_parameter_name)) {
unset($prepared_parameter_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
unset($parsed_parameter_value);
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'pragma parameter value', ':{expected_format}' => '1*(tchar) / 1*(quoted-string)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'pragma parameter value', ':{expected_format}' => '1*(tchar) / 1*(quoted-string)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed_parameter_value['invalid']);
if ($append) {
if (!isset($this->response[static::RESPONSE_PRAGMA])) {
- $this->response[static::RESPONSE_PRAGMA] = array();
+ $this->response[static::RESPONSE_PRAGMA] = [];
}
$this->response[static::RESPONSE_PRAGMA][$prepared_parameter_name] = $parsed_parameter_value['text'];
}
else {
- $this->response[static::RESPONSE_PRAGMA] = array($prepared_parameter_name => $parsed_parameter_value['text']);
+ $this->response[static::RESPONSE_PRAGMA] = [$prepared_parameter_name => $parsed_parameter_value['text']];
}
unset($prepared_parameter_name);
unset($parsed_parameter_value);
public function set_response_proxy_authenticate($value) {
// @todo: self::RESPONSE_PROXY_AUTHENTICATE
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response proxy authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response proxy authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
public function set_response_public_key_pins($value) {
// @todo: self::RESPONSE_PUBLIC_KEY_PINS
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response public key pins', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response public key pins', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
public function set_response_refresh($value) {
// @todo: self::RESPONSE_REFRESH
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response refresh', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response refresh', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_retry_after($date, $seconds = FALSE) {
if (!is_int($date)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($seconds)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_RETRY_AFTER] = array(
+ $this->response[static::RESPONSE_RETRY_AFTER] = [
'value' => $date,
'is_seconds' => $seconds,
- );
+ ];
return new c_base_return_true();
}
public function set_response_server($value) {
// @todo: self::RESPONSE_SERVER
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response server', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response server', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_set_cookie($cookie, $append = TRUE) {
if (!($cookie instanceof c_base_cookie)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'cookie', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'cookie', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$cookie_name = $cookie->get_name()->get_value_exact();
if ($append) {
if (!isset($this->response[static::RESPONSE_SET_COOKIE]) || !is_array($this->response[static::RESPONSE_SET_COOKIE])) {
- $this->response[static::RESPONSE_SET_COOKIE] = array();
+ $this->response[static::RESPONSE_SET_COOKIE] = [];
}
$this->response[static::RESPONSE_SET_COOKIE][$cookie_name] = clone($cookie);
}
else {
- $this->response[static::RESPONSE_SET_COOKIE] = array($cookie_name => clone($cookie));
+ $this->response[static::RESPONSE_SET_COOKIE] = [$cookie_name => clone($cookie)];
}
unset($cookie_name);
*/
public function set_response_status($code) {
if (!is_int($code)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
public function set_response_strict_transport_security($value) {
// @todo: self::RESPONSE_STRICT_SECURITY_TRANSPORT
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response strict transport security', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response strict transport security', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
public function set_response_trailer($value) {
// @todo: self::RESPONSE_TRAILER
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response trailer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response trailer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
// @todo: self::RESPONSE_TRANSFER_ENCODING
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response transfer encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response transfer encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
public function set_response_upgrade($value) {
// @todo: self::RESPONSE_UPGRADE
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response upgrade', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response upgrade', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_vary($header_name, $append = TRUE) {
if (!is_string($header_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$prepared_token = $this->p_prepare_token($header_name, FALSE);
if ($prepared_token === FALSE) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($append) {
if (!isset($this->response[static::RESPONSE_VARY]) || !is_array($this->response[static::RESPONSE_VARY])) {
- $this->response[static::RESPONSE_VARY] = array();
+ $this->response[static::RESPONSE_VARY] = [];
}
$this->response[static::RESPONSE_VARY][$prepared_token] = $prepared_token;
}
else {
- $this->response[static::RESPONSE_VARY] = array($prepared_token => $prepared_token);
+ $this->response[static::RESPONSE_VARY] = [$prepared_token => $prepared_token];
}
unset($prepared_token);
public function set_response_warning($value) {
// @todo: self::RESPONSE_WARNING
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response warning', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response warning', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
public function set_response_www_authenticate($value) {
// @todo: self::RESPONSE_WWW_AUTHENTICATE
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response www authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response www authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_protocol($protocol) {
if (!is_string($protocol)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'protocol', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'protocol', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_content_security_policy($policy_name, $policy_value, $append = TRUE) {
if (!is_string($policy_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'policy_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'policy_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($policy_value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'policy_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'policy_value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
unset($parsed_policy_name);
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'policy name', ':{expected_format}' => '1*((alpha) | (digit) | '-')', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'policy name', ':{expected_format}' => '1*((alpha) | (digit) | '-')', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed_policy_name['invalid']);
if ($text['invalid']) {
unset($text);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->pr_rfc_string_prepare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
unset($parsed_policy_value);
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'policy value', ':{expected_format}' => '1*(vchar, except \';\' and \',\')', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'policy value', ':{expected_format}' => '1*(vchar, except \';\' and \',\')', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
unset($parsed_policy_value['invalid']);
if ($append) {
if (!isset($this->response[static::RESPONSE_CONTENT_SECURITY_POLICY]) || !is_array($this->response[static::RESPONSE_CONTENT_SECURITY_POLICY])) {
- $this->response[static::RESPONSE_CONTENT_SECURITY_POLICY] = array(
- $parsed_policy_name['text'] => array(),
- );
+ $this->response[static::RESPONSE_CONTENT_SECURITY_POLICY] = [
+ $parsed_policy_name['text'] => [],
+ ];
}
$this->response[static::RESPONSE_CONTENT_SECURITY_POLICY][$parsed_policy_name['text']][] = $parsed_policy_value['text'];
}
else {
- $this->response[static::RESPONSE_CONTENT_SECURITY_POLICY] = array($parsed_policy_name['text'] => array($parsed_policy_value['text']));
+ $this->response[static::RESPONSE_CONTENT_SECURITY_POLICY] = [$parsed_policy_name['text'] => [$parsed_policy_value['text']]];
}
unset($parsed_policy_name);
unset($parsed_policy_value);
*/
public function set_response_x_content_type_options($no_sniff) {
if (!is_bool($no_sniff)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'no_sniff', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'no_sniff', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_x_ua_compatible($browser_name, $compatible_version) {
if (!is_string($parameter_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'parameter_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($compatible_version) && !is_string($compatible_version)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'compatible_version', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'compatible_version', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_browser_name === FALSE) {
unset($prepared_browser_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'browser name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'browser name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
if (empty($prepared_browser_name)) {
unset($prepared_browser_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'browser_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'browser_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($prepared_compatible_version === FALSE) {
unset($prepared_compatible_version);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'browser name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'browser name', ':{expected_format}' => '1*(tchar)', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
if (empty($prepared_compatible_version)) {
unset($prepared_compatible_version);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'compatible_version', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'compatible_version', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($append) {
if (!isset($this->response[static::RESPONSE_X_UA_COMPATIBLE])) {
- $this->response[static::RESPONSE_X_UA_COMPATIBLE] = array();
+ $this->response[static::RESPONSE_X_UA_COMPATIBLE] = [];
}
$this->response[static::RESPONSE_X_UA_COMPATIBLE][$prepared_browser_name] = $parsed_compatible_version['text'];
}
else {
- $this->response[static::RESPONSE_X_UA_COMPATIBLE] = array($prepared_browser_name => $parsed_compatible_version['text']);
+ $this->response[static::RESPONSE_X_UA_COMPATIBLE] = [$prepared_browser_name => $parsed_compatible_version['text']];
}
unset($prepared_browser_name);
unset($parsed_compatible_version);
$action = static::CHECKSUM_ACTION_AUTO;
}
elseif (!is_int($action)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($action != static::CHECKSUM_ACTION_NONE && $action != static::CHECKSUM_ACTION_AUTO && $action != static::CHECKSUM_ACTION_MANUAL) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($action == static::CHECKSUM_ACTION_MANUAL) {
if (!is_int($what)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($checksum)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($what != static::CHECKSUM_WHAT_PARTIAL && $what != static::CHECKSUM_WHAT_FULL) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
case CHECKSUM_PG:
break;
default:
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CHECKSUM_HEADER] = array(
+ $this->response[static::RESPONSE_CHECKSUM_HEADER] = [
'checksum' => $checksum,
'action' => $action,
'what' => $what,
'type' => $type,
- );
+ ];
}
else {
if (!is_null($what) && !is_int($what)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($type) && !is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($action) && !is_int($action)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CHECKSUM_HEADER] = array(
+ $this->response[static::RESPONSE_CHECKSUM_HEADER] = [
'checksum' => NULL,
'action' => $action,
'what' => static::CHECKSUM_WHAT_FULL,
'type' => static::CHECKSUM_SHA256,
- );
+ ];
if (!is_null($what)) {
$this->response[static::RESPONSE_CHECKSUM_HEADER]['what'] = $what;
*/
public function set_response_checksum_headers($header_name, $append = TRUE) {
if (!is_string($header_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'header_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$prepared_token = $this->p_prepare_token($header_name);
if ($prepared_token === FALSE) {
unset($prepared_token);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_prepare_token', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
if ($append) {
if (!isset($this->response[static::RESPONSE_CHECKSUM_HEADERS]) || !is_array($this->response[static::RESPONSE_CHECKSUM_HEADERS])) {
- $this->response[static::RESPONSE_CHECKSUM_HEADERS] = array();
+ $this->response[static::RESPONSE_CHECKSUM_HEADERS] = [];
}
$this->response[static::RESPONSE_CHECKSUM_HEADERS][$prepared_token] = $prepared_token;
}
else {
- $this->response[static::RESPONSE_CHECKSUM_HEADERS] = array($prepared_token => $prepared_token);
+ $this->response[static::RESPONSE_CHECKSUM_HEADERS] = [$prepared_token => $prepared_token];
}
unset($prepared_token);
$action = static::CHECKSUM_ACTION_AUTO;
}
else if (!is_int($action)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($action != static::CHECKSUM_ACTION_NONE && $action != static::CHECKSUM_ACTION_AUTO && $action != static::CHECKSUM_ACTION_MANUAL) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($action == static::CHECKSUM_ACTION_MANUAL) {
if (!is_int($what)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($checksum)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'checksum', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($what != static::CHECKSUM_WHAT_PARTIAL && $what != static::CHECKSUM_WHAT_FULL) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
case CHECKSUM_PG:
break;
default:
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CHECKSUM_CONTENT] = array(
+ $this->response[static::RESPONSE_CHECKSUM_CONTENT] = [
'checksum' => $checksum,
'action' => $action,
'what' => $what,
'type' => $type,
- );
+ ];
}
else {
if (!is_null($what) && !is_int($what)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'what', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($type) && !is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($action)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'action', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->response[static::RESPONSE_CHECKSUM_CONTENT] = array(
+ $this->response[static::RESPONSE_CHECKSUM_CONTENT] = [
'checksum' => NULL,
'action' => $action,
'what' => static::CHECKSUM_WHAT_FULL,
'type' => static::CHECKSUM_SHA256,
- );
+ ];
if (!is_null($what)) {
$this->response[static::RESPONSE_CHECKSUM_HEADER]['what'] = $what;
*/
public function set_response_content_revision($revision) {
if (!is_int($revision)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'revision', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'revision', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function unset_response_value($response_id) {
if (!is_int($response_id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'response_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'response_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_access_control_allow_origin() {
if (!array_key_exists(static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN]);
*/
public function get_response_access_control_allow_credentials() {
if (!array_key_exists(static::RESPONSE_ACCESS_CONTROL_ALLOW_CREDENTIALS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_CREDENTIALS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_CREDENTIALS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(FALSE, 'c_base_return_bool', $error);
}
*/
public function get_response_access_control_expose_headers() {
if (!array_key_exists(static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS]);
*/
public function get_response_access_control_max_age() {
if (!array_key_exists(static::RESPONSE_ACCESS_CONTROL_MAX_AGE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCESS_CONTROL_MAX_AGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCESS_CONTROL_MAX_AGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public function get_response_access_control_allow_methods() {
if (!array_key_exists(static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_METHODS]);
*/
public function get_response_access_control_allow_headers() {
if (!array_key_exists(static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_ACCESS_CONTROL_ALLOW_HEADERS]);
*/
public function get_response_accept_patch() {
if (!array_key_exists(static::RESPONSE_ACCEPT_PATCH, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCEPT_PATCH, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCEPT_PATCH, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_ACCEPT_PATCH]);
*/
public function get_response_accept_ranges() {
if (!array_key_exists(static::RESPONSE_ACCEPT_RANGES, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ACCEPT_RANGES, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ACCEPT_RANGES, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public function get_response_age() {
if (!array_key_exists(static::RESPONSE_AGE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_AGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_AGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public function get_response_allow() {
if (!array_key_exists(static::RESPONSE_ALLOW, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ALLOW, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ALLOW, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_ALLOW]);
* An array containing the cache-control directives.
* Each array key is a name and if that directive has no value, then the related directive name will have a NULL value.
* For example, a directive of "no-cache" will have the following array structure:
- * - array("no-cache" => NULL)
+ * - ["no-cache" => NULL]
* For example, a directive of "private, max-age=32" will have the following array structure:
- * - array("private" => NULL, "max-age" => 32)
+ * - ["private" => NULL, "max-age" => 32]
*
* An empty array with error bit set is returned on error, including when the key is not defined.
*
*/
public function get_response_cache_control() {
if (!array_key_exists(static::RESPONSE_CACHE_CONTROL, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CACHE_CONTROL, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CACHE_CONTROL, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CACHE_CONTROL]);
*/
public function get_response_connection() {
if (!array_key_exists(static::RESPONSE_CONNECTION, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONNECTION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONNECTION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CONNECTION]);
*/
public function get_response_content_disposition() {
if (!array_key_exists(static::RESPONSE_CONTENT_DISPOSITION, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_DISPOSITION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_DISPOSITION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CONTENT_DISPOSITION]);
*/
public function get_response_content_encoding() {
if (!array_key_exists(static::RESPONSE_CONTENT_ENCODING, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_ENCODING, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_ENCODING, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CONTENT_ENCODING]);
*/
public function get_response_content_language() {
if (!array_key_exists(static::RESPONSE_CONTENT_LANGUAGE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_LANGUAGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_LANGUAGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CONTENT_LANGUAGE]);
*/
public function get_response_content_length() {
if (!array_key_exists(static::RESPONSE_CONTENT_LENGTH, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_LENGTH, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_LENGTH, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public function get_response_content_range() {
if (!array_key_exists(static::RESPONSE_CONTENT_RANGE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_RANGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_RANGE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CONTENT_RANGE]);
*/
public function get_response_content_type() {
if (!array_key_exists(static::RESPONSE_CONTENT_TYPE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_TYPE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_TYPE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CONTENT_TYPE]);
*/
public function get_response_date() {
if (!array_key_exists(static::RESPONSE_DATE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_DATE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_DATE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
*/
public function get_response_date_actual() {
if (!array_key_exists(static::RESPONSE_DATE_ACTUAL, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_DATE_ACTUAL, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_DATE_ACTUAL, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
*/
public function get_response_etag() {
if (!array_key_exists(static::RESPONSE_ETAG, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_ETAG, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_ETAG, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_ETAG]);
*/
public function get_response_expires() {
if (!array_key_exists(static::RESPONSE_EXPIRES, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_EXPIRES, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_EXPIRES, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
*/
public function get_response_last_modified() {
if (!array_key_exists(static::RESPONSE_LAST_MODIFIED, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_LAST_MODIFIED, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_LAST_MODIFIED, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
*/
public function get_response_link() {
if (!array_key_exists(static::RESPONSE_LINK, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_LINK, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_LINK, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_LINK]);
*/
public function get_response_location() {
if (!array_key_exists(static::RESPONSE_LOCATION, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_LOCATION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_LOCATION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_LOCATION]);
*/
public function get_response_pragma() {
if (!array_key_exists(static::RESPONSE_PRAGMA, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_PRAGMA, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_PRAGMA, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_PRAGMA]);
*/
public function get_response_proxy_authenticate() {
if (!array_key_exists(static::RESPONSE_PROXY_AUTHENTICATE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_PROXY_AUTHENTICATE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_PROXY_AUTHENTICATE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response proxy authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response proxy authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_public_key_pins() {
if (!array_key_exists(static::RESPONSE_PUBLIC_KEY_PINS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_PUBLIC_KEY_PINS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_PUBLIC_KEY_PINS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response public key pins', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response public key pins', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_refresh() {
if (!array_key_exists(static::RESPONSE_REFRESH, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_REFRESH, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_REFRESH, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response refresh', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response refresh', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_retry_after() {
if (!array_key_exists(static::RESPONSE_RETRY_AFTER, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_RETRY_AFTER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_RETRY_AFTER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_RETRY_AFTER]);
*/
public function get_response_set_cookie() {
if (!array_key_exists(static::RESPONSE_SET_COOKIE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_SET_COOKIE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_cookie', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_SET_COOKIE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_cookie', $error);
}
return $this->response[static::RESPONSE_SET_COOKIE];
*/
public function get_response_server() {
if (!array_key_exists(static::RESPONSE_SERVER, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_SERVER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_SERVER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response server', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response server', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_status() {
if (!array_key_exists(static::RESPONSE_STATUS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_STATUS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_STATUS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public function get_response_strict_transport_security() {
if (!array_key_exists(static::RESPONSE_STRICT_TRANSPORT_SECURITY, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_STRICT_TRANSPORT_SECURITY, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_STRICT_TRANSPORT_SECURITY, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response strict transport security', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response strict transport security', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_trailer() {
if (!array_key_exists(static::RESPONSE_TRAILER, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_TRAILER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_TRAILER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response trailer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response trailer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_transfer_encoding() {
if (!array_key_exists(static::RESPONSE_TRANSFER_ENCODING, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_TRANSFER_ENCODING, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_TRANSFER_ENCODING, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response transfer encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response transfer encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_upgrade() {
if (!array_key_exists(static::RESPONSE_UPGRADE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_UPGRADE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_UPGRADE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response upgrade', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response upgrade', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_vary() {
if (!array_key_exists(static::RESPONSE_VARY, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_VARY, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_VARY, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_VARY]);
*/
public function get_response_warning() {
if (!array_key_exists(static::RESPONSE_WARNING, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_WARNING, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_WARNING, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response warning', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response warning', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_www_authenticate() {
if (!array_key_exists(static::RESPONSE_WWW_AUTHENTICATE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_WWW_AUTHENTICATE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_WWW_AUTHENTICATE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
// @todo
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{functionality_name}' => 'http response www authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_SUPPORT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{functionality_name}' => 'http response www authenticate', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_SUPPORT);
return c_base_return_error::s_false($error);
}
*/
public function get_response_protocol() {
if (!array_key_exists(static::RESPONSE_PROTOCOL, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_PROTOCOL, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_PROTOCOL, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public function get_response_content_security_policy() {
if (!array_key_exists(static::RESPONSE_CONTENT_SECURITY_POLICY, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_SECURITY_POLICY, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_SECURITY_POLICY, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CONTENT_SECURITY_POLICY]);
*/
public function get_response_x_content_type_options() {
if (!array_key_exists(static::RESPONSE_X_CONTENT_TYPE_OPTIONS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_X_CONTENT_TYPE_OPTIONS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_X_CONTENT_TYPE_OPTIONS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(FALSE, 'c_base_return_bool', $error);
}
*/
public function get_response_x_ua_compatible() {
if (!array_key_exists(static::RESPONSE_X_UA_COMPATIBLE, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_X_UA_COMPATIBLE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_X_UA_COMPATIBLE, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_X_UA_COMPATIBLE]);
*/
public function get_response_checksum_header() {
if (!array_key_exists(static::RESPONSE_CHECKSUM_HEADER, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CHECKSUM_HEADER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CHECKSUM_HEADER, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CHECKSUM_HEADER]);
*/
public function get_response_checksum_headers() {
if (!array_key_exists(static::RESPONSE_CHECKSUM_HEADERS, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CHECKSUM_HEADERS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CHECKSUM_HEADERS, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CHECKSUM_HEADERS]);
*/
public function get_response_checksum_content() {
if (!array_key_exists(static::RESPONSE_CHECKSUM_CONTENT, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CHECKSUM_CONTENT, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CHECKSUM_CONTENT, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($this->response[static::RESPONSE_CHECKSUM_CONTENT]);
*/
public function get_response_content_revision() {
if (!array_key_exists(static::RESPONSE_CONTENT_REVISION, $this->response)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => static::RESPONSE_CONTENT_REVISION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => static::RESPONSE_CONTENT_REVISION, ':{array_name}' => 'this->response', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public function send_response_headers($shuffle = TRUE) {
if (!is_bool($shuffle)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'shuffle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'shuffle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($this->headers_sent || headers_sent()) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'headers_sent()', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_UNECESSARY);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'headers_sent()', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_UNECESSARY);
return c_base_return_error::s_false($error);
}
if ($shuffle) {
- $headers = array();
+ $headers = [];
// shuffle() alters the array keys, so some additional processing must be done to protect the array keys.
$shuffled = array_flip($this->p_get_header_response_mapping());
}
// this is used to create header and still perform checksums against.
- $header_output = array();
+ $header_output = [];
$header_id_to_names = $this->p_get_header_response_mapping(TRUE);
*/
public function encode_response_content($compression = NULL, $max_filesize = NULL) {
if (!is_null($compression) && !is_int($compression)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'compression', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'compression', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($max_filesize) && !(is_int($max_filesize) && $max_filesize > 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'max_filesize', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'max_filesize', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
unset($filename);
unset($content);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
unset($filename);
unset($content);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
if (!file_exists($filename)) {
unset($filename);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
if ($opened_file === FALSE) {
unset($filename);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
*/
public function sanitize_path($path) {
if (!is_string($path)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
$this->request[static::REQUEST_ACCEPT]['defined'] = TRUE;
$this->request[static::REQUEST_ACCEPT]['data']['accept'] = NULL;
$this->request[static::REQUEST_ACCEPT]['data']['category'] = NULL;
- $this->request[static::REQUEST_ACCEPT]['data']['weight'] = array();
- $this->request[static::REQUEST_ACCEPT]['data']['types'] = array();
- #$this->request[static::REQUEST_ACCEPT]['data']['categories'] = array();
+ $this->request[static::REQUEST_ACCEPT]['data']['weight'] = [];
+ $this->request[static::REQUEST_ACCEPT]['data']['types'] = [];
+ #$this->request[static::REQUEST_ACCEPT]['data']['categories'] = [];
// convert the known values into integers for improved processing.
foreach ($this->request[static::REQUEST_ACCEPT]['data']['choices'] as $weight => &$choice) {
}
else {
$this->request[static::REQUEST_ACCEPT_LANGUAGE]['defined'] = TRUE;
- $this->request[static::REQUEST_ACCEPT_LANGUAGE]['data']['weight'] = array();
+ $this->request[static::REQUEST_ACCEPT_LANGUAGE]['data']['weight'] = [];
// convert the known values into integers for improved processing.
foreach ($this->request[static::REQUEST_ACCEPT_LANGUAGE]['data']['choices'] as $weight => &$choice) {
}
else {
$this->request[static::REQUEST_ACCEPT_ENCODING]['defined'] = TRUE;
- $this->request[static::REQUEST_ACCEPT_ENCODING]['data']['weight'] = array();
+ $this->request[static::REQUEST_ACCEPT_ENCODING]['data']['weight'] = [];
// convert the known values into integers for improved processing.
foreach ($this->request[static::REQUEST_ACCEPT_ENCODING]['data']['choices'] as $weight => &$choice) {
}
else {
$this->request[static::REQUEST_ACCEPT_CHARSET]['defined'] = TRUE;
- $this->request[static::REQUEST_ACCEPT_CHARSET]['data']['weight'] = array();
+ $this->request[static::REQUEST_ACCEPT_CHARSET]['data']['weight'] = [];
// convert the known values into integers for improved processing.
foreach ($this->request[static::REQUEST_ACCEPT_CHARSET]['data']['choices'] as $weight => &$choice) {
return;
}
- $this->request[static::REQUEST_ACCESS_CONTROL_REQUEST_METHOD]['data'] = array();
+ $this->request[static::REQUEST_ACCESS_CONTROL_REQUEST_METHOD]['data'] = [];
foreach ($methods as $method) {
switch ($method) {
return;
}
- $this->request[static::REQUEST_CACHE_CONTROL]['data'] = array(
- 'methods' => array(),
- );
+ $this->request[static::REQUEST_CACHE_CONTROL]['data'] = [
+ 'methods' => [],
+ ];
- $integer_types = array(
+ $integer_types = [
SELF::CACHE_CONTROL_MAX_AGE => 'max-age=',
SELF::CACHE_CONTROL_MAX_STALE => 'max-stale=',
SELF::CACHE_CONTROL_MIN_FRESH => 'min-fresh=',
- );
+ ];
$parts = mb_split(', ', $cache_control);
foreach ($parts as $part) {
* @see: https://tools.ietf.org/html/rfc6265
*/
private function p_load_request_cookies() {
- $this->request[static::REQUEST_COOKIE]['data'] = array();
+ $this->request[static::REQUEST_COOKIE]['data'] = [];
foreach ($_COOKIE as $cookie_name => $cookie_values) {
$cookie = new c_base_cookie();
$timestamp = strtotime($this->headers['if-range']);
if ($timestamp === FALSE) {
$this->request[static::REQUEST_IF_RANGE]['invalid'] = TRUE;
- $this->request[static::REQUEST_IF_RANGE]['data'] = array(
+ $this->request[static::REQUEST_IF_RANGE]['data'] = [
'is_date' => TRUE,
- );
+ ];
unset($timestamp);
return;
}
$this->request[static::REQUEST_IF_RANGE]['defined'] = TRUE;
- $this->request[static::REQUEST_IF_RANGE]['data'] = array(
+ $this->request[static::REQUEST_IF_RANGE]['data'] = [
'range' => $timestamp,
'is_date' => TRUE,
- );
+ ];
unset($timestamp);
return;
* @see: https://tools.ietf.org/html/rfc7232
*/
private function p_parse_if_entity_tag($match) {
- $result = array(
- 'matches' => array(),
+ $result = [
+ 'matches' => [],
'any' => FALSE,
'invalid' => FALSE,
- );
+ ];
$stop = self::p_length_string($match) + 1;
if ($stop == 0) {
* @see: https://tools.ietf.org/html/rfc7232
*/
private function p_parse_if_entity_tag_and_weak($match) {
- $result = array(
- 'matches' => array(),
- 'weak' => array(),
+ $result = [
+ 'matches' => [],
+ 'weak' => [],
'any' => FALSE,
'invalid' => FALSE,
- );
+ ];
$stop = self::p_length_string($match);
if ($stop == 0) {
* @see: https://tools.ietf.org/html/rfc7232
*/
private function p_parse_user_agent($agent) {
- $result = array(
+ $result = [
'full' => $agent,
'name_machine' => NULL,
'name_human' => NULL,
'is_ie_edge' => FALSE,
'is_ie_compatibility' => FALSE,
'invalid' => FALSE,
- );
+ ];
- $agent_matches = array();
+ $agent_matches = [];
$agent_matched = preg_match('/^[^(]*\(([^)]*)\)(.*)$/iu', $agent, $agent_matches);
if (!$agent_matched) {
// if the agent wasn't identified, check to see if this is a bot or a known command line tool.
if (is_null($result['engine_name_machine'])) {
- $agent_matches = array();
+ $agent_matches = [];
preg_match('/^([^(]+)/iu', $agent, $agent_matches);
if (isset($agent_matches[0])) {
* - 'invalid': a boolean representing whether or not this string is valid or if an error occurred.
*/
private function p_parse_checksum($checksum) {
- $result = array(
+ $result = [
'what' => NULL,
'type' => NULL,
'checksum' => NULL,
'invalid' => FALSE,
- );
+ ];
$fixed_checksum = c_base_utf8::s_lowercase(preg_replace('/(^\s+)|(\s+$)/us', '', $checksum))->get_value_exact();
if (empty($fixed_checksum)) {
* - 'invalid': a boolean representing whether or not this string is valid or if an error occurred.
*/
private function p_parse_checksum_headers($checksum_headers) {
- $result = array(
- 'headers' => array(
- 'known' => array(),
- 'unknown' => array(),
- ),
+ $result = [
+ 'headers' => [
+ 'known' => [],
+ 'unknown' => [],
+ ],
'invalid' => FALSE,
- );
+ ];
$fixed_checksum = c_base_utf8::s_lowercase(preg_replace("/(^( |\t)+)|(( |\t)+$)/us", '', $checksum_headers))->get_value_exact();
if (empty($fixed_checksum)) {
* - This will then appear in $_SERVER.
*/
private function p_get_all_headers() {
- $this->headers = array();
+ $this->headers = [];
// this works with apache.
if (function_exists('getallheaders')) {
* An array for mapping HTTP request header strings to header ids.
*/
private function p_get_header_request_mapping() {
- return array(
+ return [
'accept' => static::REQUEST_ACCEPT,
'accept-charset' => static::REQUEST_ACCEPT_CHARSET,
'accept-encoding' => static::REQUEST_ACCEPT_ENCODING,
'checksum_header' => static::REQUEST_CHECKSUM_HEADER,
'checksum_headers' => static::REQUEST_CHECKSUM_HEADERS,
'checksum_content' => static::REQUEST_CHECKSUM_CONTENT,
- );
+ ];
}
/**
*/
private function p_get_header_response_mapping($case_first = FALSE) {
if ($case_first) {
- return array(
+ return [
static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN => 'Access-Control-Allow-Origin',
static::RESPONSE_ACCESS_CONTROL_ALLOW_CREDENTIALS => 'Access-Control-Allow-Credentials',
static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS => 'Access-Control-Expose-Headers',
static::RESPONSE_WWW_AUTHENTICATE => 'Www-Authenticate',
static::RESPONSE_X_CONTENT_TYPE_OPTIONS => 'X-Content-Type-Options',
static::RESPONSE_X_UA_COMPATIBLE => 'X-UA-Compatible',
- );
+ ];
}
- return array(
+ return [
static::RESPONSE_ACCESS_CONTROL_ALLOW_ORIGIN => 'access-control-allow-origin',
static::RESPONSE_ACCESS_CONTROL_ALLOW_CREDENTIALS => 'access-control-allow-credentials',
static::RESPONSE_ACCESS_CONTROL_EXPOSE_HEADERS => 'access-control-expose-headers',
static::RESPONSE_WWW_AUTHENTICATE => 'www-authenticate',
static::RESPONSE_X_CONTENT_TYPE_OPTIONS => 'x-content-type-options',
static::RESPONSE_X_UA_COMPATIBLE => 'x-ua-compatible',
- );
+ ];
}
/**
* An array for mapping HTTP response header strings to header ids.
*/
private function p_get_http_method_mapping() {
- return array(
+ return [
'get' => static::HTTP_METHOD_GET,
'head' => static::HTTP_METHOD_HEAD,
'post' => static::HTTP_METHOD_POST,
'connect' => static::HTTP_METHOD_CONNECT,
'patch' => static::HTTP_METHOD_PATCH,
'track' => static::HTTP_METHOD_TRACK,
- );
+ ];
}
/**
return;
}
- $header_output[static::RESPONSE_SET_COOKIE] = array();
+ $header_output[static::RESPONSE_SET_COOKIE] = [];
foreach ($this->response[static::RESPONSE_SET_COOKIE] as $cookie) {
if (!($cookie instanceof c_base_cookie)) {
continue;
}
// in this case, a new header is created for every single entry.
- $header_output[static::RESPONSE_X_UA_COMPATIBLE] = array();
+ $header_output[static::RESPONSE_X_UA_COMPATIBLE] = [];
foreach($this->response[static::RESPONSE_X_UA_COMPATIBLE] as $browser_name => $compatible_version) {
$header_output[static::RESPONSE_X_UA_COMPATIBLE][] = $browser_name . '=' . $compatible_version;
}
private function p_prepare_header_response_checksum_content($header_name, &$header_output) {
// this field is generally auto-populated, so enforce a default.
if (!isset($this->response[static::RESPONSE_CHECKSUM_CONTENT])) {
- $this->response[static::RESPONSE_CHECKSUM_CONTENT] = array(
+ $this->response[static::RESPONSE_CHECKSUM_CONTENT] = [
'checksum' => NULL,
'action' => static::CHECKSUM_ACTION_AUTO,
'what' => static::CHECKSUM_WHAT_FULL,
'type' => static::CHECKSUM_SHA256,
- );
+ ];
}
// setting this to none manually disables checksum generation.
unset($algorithm);
unset($use_hash);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $filename, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
private function p_prepare_header_response_checksum_header($headers_name, $header_name, &$header_output, $status_string) {
// this field is generally auto-populated, so enforce a default.
if (!isset($this->response[static::RESPONSE_CHECKSUM_HEADER])) {
- $this->response[static::RESPONSE_CHECKSUM_HEADER] = array(
+ $this->response[static::RESPONSE_CHECKSUM_HEADER] = [
'checksum' => NULL,
'action' => static::CHECKSUM_ACTION_AUTO,
'what' => static::CHECKSUM_WHAT_FULL,
'type' => static::CHECKSUM_SHA256,
- );
+ ];
}
// setting this to none manually disables checksum generation.
// allow for the list of headers to be customized, but if it is not defined, use all available (allowed) headers.
if (array_key_exists(static::RESPONSE_CHECKSUM_HEADERS, $this->response)) {
- $header_output_copy = array();
- $header_output[static::RESPONSE_CHECKSUM_HEADERS] = array();
+ $header_output_copy = [];
+ $header_output[static::RESPONSE_CHECKSUM_HEADERS] = [];
foreach ($this->response[static::RESPONSE_CHECKSUM_HEADERS] as $header_response_id => $header_response_value) {
$header_output_copy[$header_response_id] = $header_response_id;
$header_output[static::RESPONSE_CHECKSUM_HEADERS][$header_response_id] = $header_response_id;
$this->content = gzencode($this->content, $compression, FORCE_GZIP);
$this->content_is_file = FALSE;
- $this->response[static::RESPONSE_CONTENT_ENCODING] = array($encoding);
+ $this->response[static::RESPONSE_CONTENT_ENCODING] = [$encoding];
if ($calculate_content_length) {
$this->response[static::RESPONSE_CONTENT_LENGTH] = strlen($this->content);
$this->content = gzencode($content, $compression, FORCE_DEFLATE);
$this->content_is_file = FALSE;
- $this->response[static::RESPONSE_CONTENT_ENCODING] = array($encoding);
+ $this->response[static::RESPONSE_CONTENT_ENCODING] = [$encoding];
if ($calculate_content_length) {
$this->response[static::RESPONSE_CONTENT_LENGTH] = strlen($this->content);
$this->content = bzcompress($content, $compression);
$this->content_is_file = FALSE;
- $this->response[static::RESPONSE_CONTENT_ENCODING] = array($encoding);
+ $this->response[static::RESPONSE_CONTENT_ENCODING] = [$encoding];
if ($calculate_content_length) {
$this->response[static::RESPONSE_CONTENT_LENGTH] = strlen($this->content);
$this->content = lzo_compress($content, $compression);
$this->content_is_file = FALSE;
- $this->response[static::RESPONSE_CONTENT_ENCODING] = array($encoding);
+ $this->response[static::RESPONSE_CONTENT_ENCODING] = [$encoding];
if ($calculate_content_length) {
$this->response[static::RESPONSE_CONTENT_LENGTH] = strlen($this->content);
*/
public static function to_text($status) {
if (!is_int($status)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'status', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
final class c_base_languages_us_only implements i_base_languages {
- private static $s_aliases = array(
- self::ENGLISH_US => array('en-us'),
- self::ENGLISH => array('eng', 'en'),
- self::UNDETERMINED => array('und'),
- self::NOT_APPLICABLE => array('zxx'),
- );
-
- private static $s_names = array(
- self::ENGLISH_US => array('US English'),
- self::ENGLISH => array('English'),
- self::UNDETERMINED => array('Undetermined'),
- self::NOT_APPLICABLE => array('No Linguistic Content', 'Not Applicable'),
- );
-
- private static $s_ids = array(
+ private static $s_aliases = [
+ self::ENGLISH_US => ['en-us'],
+ self::ENGLISH => ['eng', 'en'],
+ self::UNDETERMINED => ['und'],
+ self::NOT_APPLICABLE => ['zxx'],
+ ];
+
+ private static $s_names = [
+ self::ENGLISH_US => ['US English'],
+ self::ENGLISH => ['English'],
+ self::UNDETERMINED => ['Undetermined'],
+ self::NOT_APPLICABLE => ['No Linguistic Content', 'Not Applicable'],
+ ];
+
+ private static $s_ids = [
'en-us' => self::ENGLISH_US,
'eng' => self::ENGLISH,
'en' => self::ENGLISH,
'und' => self::UNDETERMINED,
'zxx' => self::NOT_APPLICABLE,
- );
+ ];
- private static $s_rtl_ids = array(
- );
+ private static $s_rtl_ids = [
+ ];
/**
*/
public static function s_get_names_by_id($id) {
if (!is_int($id) && !is_numeric($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($id, self::$s_names)) {
*/
public static function s_get_names_by_alias($alias) {
if (!is_string($alias)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($alias, self::$s_ids) && array_key_exists(self::$s_ids[$alias], self::$s_names)) {
*/
public static function s_get_id_by_name($name) {
if (!is_string($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_get_id_by_alias($alias) {
if (!is_string($alias)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_get_aliases_by_id($id) {
if (!is_int($id) && !is_numeric($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($id, self::$s_aliases)) {
*/
public static function s_get_aliases_by_name($name) {
if (!is_string($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($name, self::$s_aliases)) {
* Implementation of s_get_ids().
*/
public static function s_get_ids() {
- $ids = array();
+ $ids = [];
foreach (self::$s_aliases as $key => $value) {
$ids[$key] = $key;
}
*/
final class c_base_languages_limited implements i_base_languages {
- private static $s_aliases = array(
- self::ENGLISH_US => array('en-us'),
- self::ENGLISH => array('eng', 'en'),
- self::FRENCH => array('fre', 'fra', 'fr'),
- self::GAELIC => array('gla', 'gd'),
- self::IRISH => array('gle', 'ga'),
- self::SPANISH => array('spa', 'es'),
- self::INDONESIAN => array('ind', 'id'),
- self::JAPANESE => array('jpn', 'ja'),
- self::RUSSIAN => array('rus', 'ru'),
- self::CHINESE => array('chi', 'zho', 'zh'),
- self::UNDETERMINED => array('und'),
- self::NOT_APPLICABLE => array('zxx'),
- );
-
- private static $s_names = array(
- self::ENGLISH_US => array('US English'),
- self::ENGLISH => array('English'),
- self::FRENCH => array('French'),
- self::GAELIC => array('Gaelic', 'Scottish Gaelic'),
- self::IRISH => array('Irish'),
- self::SPANISH => array('Spanish', 'Castilian'),
- self::INDONESIAN => array('Indonesian'),
- self::JAPANESE => array('Japanese'),
- self::RUSSIAN => array('Russian'),
- self::CHINESE => array('Chinese'),
- self::UNDETERMINED => array('Undetermined'),
- self::NOT_APPLICABLE => array('No Linguistic Content', 'Not Applicable'),
- );
-
- private static $s_ids = array(
+ private static $s_aliases = [
+ self::ENGLISH_US => ['en-us'],
+ self::ENGLISH => ['eng', 'en'],
+ self::FRENCH => ['fre', 'fra', 'fr'],
+ self::GAELIC => ['gla', 'gd'],
+ self::IRISH => ['gle', 'ga'],
+ self::SPANISH => ['spa', 'es'],
+ self::INDONESIAN => ['ind', 'id'],
+ self::JAPANESE => ['jpn', 'ja'],
+ self::RUSSIAN => ['rus', 'ru'],
+ self::CHINESE => ['chi', 'zho', 'zh'],
+ self::UNDETERMINED => ['und'],
+ self::NOT_APPLICABLE => ['zxx'],
+ ];
+
+ private static $s_names = [
+ self::ENGLISH_US => ['US English'],
+ self::ENGLISH => ['English'],
+ self::FRENCH => ['French'],
+ self::GAELIC => ['Gaelic', 'Scottish Gaelic'],
+ self::IRISH => ['Irish'],
+ self::SPANISH => ['Spanish', 'Castilian'],
+ self::INDONESIAN => ['Indonesian'],
+ self::JAPANESE => ['Japanese'],
+ self::RUSSIAN => ['Russian'],
+ self::CHINESE => ['Chinese'],
+ self::UNDETERMINED => ['Undetermined'],
+ self::NOT_APPLICABLE => ['No Linguistic Content', 'Not Applicable'],
+ ];
+
+ private static $s_ids = [
'en-us' => self::ENGLISH_US,
'eng' => self::ENGLISH,
'en' => self::ENGLISH,
'zh' => self::CHINESE,
'und' => self::UNDETERMINED,
'zxx' => self::NOT_APPLICABLE,
- );
+ ];
- private static $s_rtl_ids = array(
+ private static $s_rtl_ids = [
// @todo: populate this with $id => $id.
- );
+ ];
/**
*/
public static function s_get_names_by_id($id) {
if (!is_int($id) && !is_numeric($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($id, self::$s_names)) {
*/
public static function s_get_names_by_alias($alias) {
if (!is_string($alias)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($alias, self::$s_ids) && array_key_exists(self::$s_ids[$alias], self::$s_names)) {
*/
public static function s_get_id_by_name($name) {
if (!is_string($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_get_id_by_alias($alias) {
if (!is_string($alias)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_get_aliases_by_id($id) {
if (!is_int($id) && !is_numeric($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($id, self::$s_aliases)) {
*/
public static function s_get_aliases_by_name($name) {
if (!is_string($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($name, self::$s_aliases)) {
* Implementation of s_get_ids().
*/
public static function s_get_ids() {
- $ids = array();
+ $ids = [];
foreach (self::$s_aliases as $key => $value) {
$ids[$key] = $key;
}
*/
final class c_base_languages_all implements i_base_languages {
- private static $s_aliases = array(
- self::ENGLISH_US => array('en-us'),
- self::ENGLISH => array('eng', 'en'),
- self::ENGLISH_CA => array('en-ca'),
- self::ENGLISH_GB => array('en-gb'),
- self::AFAR => array('aar', 'aa'),
- self::ABKHAZIAN => array('abk', 'ab'),
- self::ACHINESE => array('ace'),
- self::ACOLI => array('ach'),
- self::ADANGME => array('ada'),
- self::ADYGHE => array('ady'),
- self::AFRO_ASIATIC => array('afa'),
- self::AFRIHILI => array('afh'),
- self::AFRIKAANS => array('afr', 'af'),
- self::AINU => array('ain'),
- self::AKAN => array('aka', 'ak'),
- self::AKKADIAN => array('akk'),
- self::ALBANIAN => array('alb', 'sqi', 'sq'),
- self::ALEUT => array('ale'),
- self::ALGONQUIAN => array('alg'),
- self::SOUTHERN_ALTAI => array('alt'),
- self::AMHARIC => array('amh', 'am'),
- self::ENGLISH_OLD => array('ang'),
- self::ANGIKA => array('anp'),
- self::APACHE => array('apa'),
- self::ARABIC => array('ara', 'ar'),
- self::ARAMAIC => array('arc'),
- self::ARAGONESE => array('arg', 'an'),
- self::ARMENIAN => array('arm', 'hye', 'hy'),
- self::MAPUDUNGUN => array('am'),
- self::ARAPAHO => array('arp'),
- self::ARTIFICIAL => array('art'),
- self::ARAWAK => array('arw'),
- self::ASSAMESE => array('asm', 'as'),
- self::ASTURIAN => array('ast'),
- self::ATHAPASCAN => array('ath'),
- self::AUSTRALIAN => array('aus'),
- self::AVARIC => array('ava', 'av'),
- self::AVESTAN => array('ave', 'ae'),
- self::AWADHI => array('awa'),
- self::AYMARA => array('aym', 'ay'),
- self::AZERBAIJANI => array('aze', 'az'),
- self::BANDA => array('bad'),
- self::BAMILEKE => array('bai'),
- self::BASHKIR => array('bak', 'ba'),
- self::BALUCHI => array('bal'),
- self::BAMBARA => array('bam', 'bm'),
- self::BALINESE => array('ban'),
- self::BASQUE => array('baq', 'eus', 'eu'),
- self::BASA => array('bas'),
- self::BALTIC => array('bat'),
- self::BEJA => array('bej'),
- self::BELARUSIAN => array('bel', 'be'),
- self::BEMBA => array('bem'),
- self::BENGALI => array('ben', 'bn'),
- self::BERBER => array('ber'),
- self::BHOJPURI => array('bho'),
- self::BIHARI => array('bih', 'bh'),
- self::BIKOL => array('bik'),
- self::BINI => array('bin'),
- self::BISLAMA => array('bis', 'bi'),
- self::SIKSIKA => array('bla'),
- self::BANTU => array('bnt'),
- self::TIBETAN => array('tib', 'bod', 'bo'),
- self::BOSNIAN => array('bos', 'bs'),
- self::BRAJ => array('bra'),
- self::BRETON => array('bre'),
- self::BATAK => array('btk'),
- self::BURIAT => array('bua'),
- self::BUGINESE => array('bug'),
- self::BULGARIAN => array('bul'),
- self::BURMESE => array('bur', 'mya', 'my'),
- self::BLIN => array('byn'),
- self::CADDO => array('cad'),
- self::AMERICAN_INDIAN_CENTRAL => array('cai'),
- self::GALIBI_CARIB => array('car'),
- self::CATALAN => array('cat', 'ca'),
- self::CAUCASIAN => array('cau'),
- self::CEBUANO => array('ceb'),
- self::CELTIC => array('cel'),
- self::CZECH => array('cze', 'ces', 'cs'),
- self::CHAMORRO => array('cha', 'ch'),
- self::CHIBCHA => array('chb'),
- self::CHECHEN => array('che', 'ce'),
- self::CHAGATAI => array('chg'),
- self::CHINESE => array('chi', 'zho', 'zh'),
- self::CHUUKESE => array('chk'),
- self::MARI => array('chm'),
- self::CHINOOK_JARGON => array('chn'),
- self::CHOCTAW => array('cho'),
- self::CHIPEWYAN => array('chp'),
- self::CHEROKEE => array('chr'),
- self::CHURCH_SLAVIC => array('chu', 'cu'),
- self::CHUVASH => array('chv', 'cv'),
- self::CHEYENNE => array('chy'),
- self::CHAMIC => array('cmc'),
- self::COPTIC => array('cop'),
- self::CORNISH => array('cor'),
- self::CORSICAN => array('cos', 'co'),
- self::CREOLES_ENGLISH => array('cpe'),
- self::CREOLES_FRENCH => array('cpf'),
- self::CREOLES_PORTUGESE => array('cpp'),
- self::CREE => array('cre', 'cr'),
- self::CRIMEAN_TATAR => array('crh'),
- self::CREOLES => array('crp'),
- self::KASHUBIAN => array('csb'),
- self::CUSHITIC => array('cus'),
- self::WELSH => array('wel', 'cym', 'cy'),
- self::DAKOTA => array('dak'),
- self::DANISH => array('dan', 'da'),
- self::DARGWA => array('dar'),
- self::LAND_DAYAK => array('day'),
- self::DELAWARE => array('del'),
- self::SLAVE => array('den'),
- self::GERMAN => array('ger', 'deu', 'de'),
- self::DOGRIB => array('dgr'),
- self::DINKA => array('din'),
- self::DIVEHI => array('div', 'dv'),
- self::DOGRI => array('doi'),
- self::DRAVIDIAN => array('dra'),
- self::LOWER_SORBIAN => array('dsb'),
- self::DUALA => array('dua'),
- self::DUTCH_MIDDLE => array('dum'),
- self::DUTCH_FLEMISH => array('dut', 'nld', 'nl'),
- self::DYULA => array('dyu'),
- self::DZONGKHA => array('dzo', 'dz'),
- self::EFIK => array('efi'),
- self::EGYPTIAN => array('egy'),
- self::EKAJUK => array('eka'),
- self::GREEK_MODERN => array('gre', 'ell', 'el'),
- self::ELAMITE => array('elx'),
- self::ENGLISH_MIDDLE => array('enm'),
- self::ESPERANTO => array('epo', 'eo'),
- self::ESTONIAN => array('est', 'et'),
- self::EWE => array('ewe', 'ee'),
- self::EWONDO => array('ewo'),
- self::FANG => array('fan'),
- self::FAROESE => array('fao', 'fo'),
- self::PERSIAN => array('per', 'fas', 'fa'),
- self::FANTI => array('fat'),
- self::FIJIAN => array('fij', 'fj'),
- self::FILIPINO => array('fil'),
- self::FINNISH => array('fin', 'fi'),
- self::FINNO_UGRIAN => array('fiu'),
- self::FON => array('fon'),
- self::FRENCH => array('fre', 'fra', 'fr'),
- self::FRENCH_MIDDLE => array('frm'),
- self::FRENCH_OLD => array('fro'),
- self::FRISIAN_NORTHERN => array('frr'),
- self::FRISIAN_EASTERN => array('frs'),
- self::FRISIAN_WESTERN => array('fry', 'fy'),
- self::FULAH => array('ful', 'ff'),
- self::FRIULIAN => array('fur'),
- self::GA => array('gaa'),
- self::GAYO => array('gay'),
- self::GBAYA => array('gba'),
- self::GERMANIC => array('gem'),
- self::GEORGIAN => array('geo', 'kat', 'ka'),
- self::GEEZ => array('gez'),
- self::GILBERTESE => array('gil'),
- self::GAELIC => array('gla', 'gd'),
- self::IRISH => array('gle', 'ga'),
- self::GALICIAN => array('glg', 'gl'),
- self::MANX => array('glv', 'gv'),
- self::GERMAN_MIDDLE_HIGH => array('gmh'),
- self::GERMAN_OLD_HIGH => array('goh'),
- self::GONDI => array('gon'),
- self::GORONTALO => array('gor'),
- self::GOTHIC => array('got'),
- self::GREBO => array('grb'),
- self::GREEK_ANCIENT => array('grc'),
- self::GUARANI => array('grm', 'gn'),
- self::GERMAN_SWISS => array('gsw'),
- self::GUJARATI => array('guj', 'gu'),
- self::GWICHIN => array('gwi'),
- self::HAIDA => array('hai'),
- self::HAITIAN => array('hat', 'ht'),
- self::HAUSA => array('hau', 'ha'),
- self::HAWAIIAN => array('haw'),
- self::HEBREW => array('heb', 'he'),
- self::HERERO => array('her', 'hz'),
- self::HILIGAYNON => array('hil'),
- self::HIMACHALI => array('him'),
- self::HINDI => array('hin', 'hi'),
- self::HITTITE => array('hit'),
- self::HMONG => array('hmn'),
- self::HIRI_MOTU => array('hmo', 'ho'),
- self::CROATIAN => array('hrv'),
- self::SORBIAN_UPPER => array('hsb'),
- self::HUNGARIAN => array('hun', 'hu'),
- self::HUPA => array('hup'),
- self::IBAN => array('iba'),
- self::IGBO => array('ibo', 'ig'),
- self::ICELANDIC => array('ice', 'isl', 'is'),
- self::IDO => array('ido', 'io'),
- self::SICHUAN_YI => array('iii', 'ii'),
- self::IJO => array('ijo'),
- self::INUKTITUT => array('iku', 'iu'),
- self::INTERLINGUE => array('ile', 'ie'),
- self::ILOKO => array('ilo'),
- self::INTERLINGUA => array('ina', 'ia'),
- self::INDIC => array('inc'),
- self::INDONESIAN => array('ind', 'id'),
- self::INDO_EUROPEAN => array('ine'),
- self::INGUSH => array('inh'),
- self::INUPIAQ => array('ipk', 'ik'),
- self::IRANIAN => array('ira'),
- self::IROQUOIAN => array('iro'),
- self::ITALIAN => array('ita', 'it'),
- self::JAVANESE => array('jav', 'jv'),
- self::LOJBAN => array('jbo'),
- self::JAPANESE => array('jpn', 'ja'),
- self::JUDEO_PERSIAN => array('jpr'),
- self::JUDEO_ARABIC => array('jrb'),
- self::KARA_KALPAK => array('kaa'),
- self::KABYLE => array('kab'),
- self::KACHIN => array('kac'),
- self::KALAALLISUT => array('kal', 'kl'),
- self::KAMBA => array('kam'),
- self::KANNADA => array('kan', 'kn'),
- self::KAREN => array('kar'),
- self::KASHMIRI => array('kas', 'ks'),
- self::KANURI => array('kau', 'kr'),
- self::KAWI => array('kaw'),
- self::KAZAKH => array('kaz'),
- self::KABARDIAN => array('kbd'),
- self::KHASI => array('kha'),
- self::KHOISAN => array('khi'),
- self::CENTRAL_KHMER => array('khm', 'km'),
- self::KHOTANESE => array('kho'),
- self::KIKUYU => array('kik', 'ki'),
- self::KINYARWANDA => array('kin', 'rw'),
- self::KIRGHIZ => array('kir', 'ky'),
- self::KIMBUNDU => array('kmb'),
- self::KONKANI => array('kok'),
- self::KOMI => array('kom', 'kv'),
- self::KONGO => array('kon', 'kg'),
- self::KOREAN => array('kor', 'ko'),
- self::KOSRAEAN => array('kos'),
- self::KPELLE => array('kpe'),
- self::KARACHAY_BALKAR => array('krc'),
- self::KARELIAN => array('krl'),
- self::KRU => array('kro'),
- self::KURUKH => array('kru'),
- self::KUANYAMA => array('kua', 'kj'),
- self::KUMYK => array('kum'),
- self::KURDISH => array('kur', 'ku'),
- self::KUTENAI => array('kut'),
- self::LADINO => array('lad'),
- self::LAHNDA => array('lah'),
- self::LAMBA => array('lam'),
- self::LAO => array('lao', 'lo'),
- self::LATIN => array('lat', 'la'),
- self::LATVIAN => array('lav', 'lv'),
- self::LEZGHIAN => array('lez'),
- self::LIMBURGAN => array('lim', 'li'),
- self::LINGALA => array('lin', 'ln'),
- self::LITHUANIAN => array('lit', 'lt'),
- self::MONGO => array('lol'),
- self::LOZI => array('loz'),
- self::LUXEMBOURGISH => array('ltz', 'lb'),
- self::LUBA_LULUA => array('lua'),
- self::LUBA_KATANGA => array('lub', 'lu'),
- self::GANDA => array('lug', 'lg'),
- self::LUISENO => array('lui'),
- self::LUNDA => array('lun'),
- self::LUO => array('luo'),
- self::LUSHAI => array('lus'),
- self::MACEDONIAN => array('mac', 'mkd', 'mk'),
- self::MADURESE => array('mad'),
- self::MAGAHI => array('mag'),
- self::MARSHALLESE => array('mah'),
- self::MAITHILI => array('mai'),
- self::MAKASAR => array('mak'),
- self::MALAYALAM => array('mal'),
- self::MANDINGO => array('man'),
- self::MAORI => array('mao', 'mri', 'mi'),
- self::AUSTRONESIAN => array('map'),
- self::MARATHI => array('mar', 'mr'),
- self::MASAI => array('mas'),
- self::MALAY => array('may', 'msa', 'ms'),
- self::MOKSHA => array('mdf'),
- self::MANDAR => array('mdr'),
- self::MENDE => array('men'),
- self::IRISH_MIDDLE => array('mga'),
- self::MIKMAQ => array('mic'),
- self::MINANGKABAU => array('min'),
- self::UNCODED => array('mis'),
- self::MON_KHMER => array('mkh'),
- self::MALAGASY => array('mlg'),
- self::MALTESE => array('mlt'),
- self::MANCHU => array('mnc'),
- self::MANIPURI => array('mni'),
- self::MANOBO => array('mno'),
- self::MOHAWK => array('moh'),
- self::MONGOLIAN => array('mon', 'mn'),
- self::MOSSI => array('mos'),
- self::MULTIPLE => array('mul'),
- self::MUNDA => array('mun'),
- self::CREEK => array('mus'),
- self::MIRANDESE => array('mwl'),
- self::MARWARI => array('mwr'),
- self::MAYAN => array('myn'),
- self::ERZYA => array('myv'),
- self::NAHUATL => array('nah'),
- self::AMERICAN_INDIAN_NORTH => array('nai'),
- self::NEAPOLITAN => array('nap'),
- self::NAURU => array('nau', 'na'),
- self::NAVAJO => array('nav', 'nv'),
- self::NDEBELE_SOUTH => array('nbl', 'nr'),
- self::NDEBELE_NORTH => array('nde', 'nd'),
- self::NDONGA => array('ndo', 'ng'),
- self::LOW_GERMAN => array('nds'),
- self::NEPALI => array('nep', 'ne'),
- self::NEPAL_BHASA => array('new'),
- self::NIAS => array('nia'),
- self::NIGER_KORDOFANIAN => array('nic'),
- self::NIUEAN => array('niu'),
- self::NORWEGIAN_NYNORSK => array('nno', 'nn'),
- self::BOKMAL => array('nob', 'nb'),
- self::NOGAI => array('nog'),
- self::NORSE_OLD => array('non'),
- self::NORWEGIAN => array('nor', 'no'),
- self::NKO => array('nqo'),
- self::PEDI => array('nso'),
- self::NUBIAN => array('nub'),
- self::CLASSICAL_NEWARI => array('nwc'),
- self::CHICHEWA => array('nya', 'ny'),
- self::NYAMWEZI => array('nym'),
- self::NYANKOLE => array('nyn'),
- self::NYORO => array('nyo'),
- self::NZIMA => array('nzi'),
- self::OCCITAN => array('oci', 'oc'),
- self::OJIBWA => array('oji', 'oj'),
- self::ORIYA => array('ori', 'or'),
- self::OROMO => array('orm', 'om'),
- self::OSAGE => array('osa'),
- self::OSSETIAN => array('oss', 'os'),
- self::OTTOMAN => array('ota'),
- self::OTOMIAN => array('oto'),
- self::PAPUAN => array('paa'),
- self::PANGASINAN => array('pag'),
- self::PAHLAVI => array('pal'),
- self::PAMPANGA => array('pam'),
- self::PANJABI => array('pan', 'pa'),
- self::PAPIAMENTO => array('pap'),
- self::PALAUAN => array('pau'),
- self::PERSIAN_OLD => array('peo'),
- self::PHILIPPINE => array('phi'),
- self::PHOENICIAN => array('phn'),
- self::PALI => array('pli', 'pi'),
- self::POLISH => array('pol', 'pl'),
- self::POHNPEIAN => array('pon'),
- self::PORTUGUESE => array('por', 'pt'),
- self::PRAKRIT => array('pra'),
- self::PROVENCAL => array('pro'),
- self::PUSHTO => array('pus', 'ps'),
- self::QUECHUA => array('que', 'qu'),
- self::RAJASTHANI => array('raj'),
- self::RAPANUI => array('rap'),
- self::RAROTONGAN => array('rar'),
- self::ROMANCE => array('roa'),
- self::ROMANSH => array('roh', 'rm'),
- self::ROMANY => array('rom'),
- self::ROMANIAN => array('rum', 'ron', 'ro'),
- self::RUNDI => array('run', 'rn'),
- self::AROMANIAN => array('rup'),
- self::RUSSIAN => array('rus', 'ru'),
- self::SANDAWE => array('sad'),
- self::SANGO => array('sag', 'sg'),
- self::YAKUT => array('sah'),
- self::AMERICAN_INDIAN_SOUTH => array('sai'),
- self::SALISHAN => array('sal'),
- self::SAMARITAN => array('sam'),
- self::SANSKRIT => array('san', 'sa'),
- self::SASAK => array('sas'),
- self::SANTALI => array('sat'),
- self::SICILIAN => array('scn'),
- self::SCOTS => array('sco'),
- self::SELKUP => array('sel'),
- self::SEMITIC => array('sem'),
- self::IRISH_OLD => array('sga'),
- self::SIGN => array('sgn'),
- self::SHAN => array('shn'),
- self::SIDAMO => array('sid'),
- self::SINHALA => array('sin', 'si'),
- self::SIOUAN => array('sio'),
- self::SINO_TIBETAN => array('sit'),
- self::SLAVIC => array('sla'),
- self::SLOVAK => array('slo', 'slk', 'sk'),
- self::SLOVENIAN => array('slv', 'sl'),
- self::SAMI_SOUTHERN => array('sma'),
- self::SAMI_NORTHERN => array('sme', 'se'),
- self::SAMI => array('smi'),
- self::SAMI_LULE => array('smj'),
- self::SAMI_IRARI => array('smn'),
- self::SAMOAN => array('smo', 'sm'),
- self::SAMI_SKOLT => array('sms'),
- self::SHONA => array('sna', 'sn'),
- self::SINDHI => array('snd', 'sd'),
- self::SONINKE => array('snk'),
- self::SOGDIAN => array('sog'),
- self::SOMALI => array('som', 'so'),
- self::SONGHAI => array('son'),
- self::SOTHO_SOUTHERN => array('sot', 'st'),
- self::SPANISH => array('spa', 'es'),
- self::SARDINIAN => array('srd', 'sc'),
- self::SRANAN_TONGO => array('sm'),
- self::SERBIAN => array('srp', 'sr'),
- self::SERER => array('srr'),
- self::NILO_SAHARAN => array('ssa'),
- self::SWATI => array('ssw', 'ss'),
- self::SUKUMA => array('suk'),
- self::SUNDANESE => array('sun', 'su'),
- self::SUSU => array('sus'),
- self::SUMERIAN => array('sux'),
- self::SWAHILI => array('swa', 'sw'),
- self::SWEDISH => array('swe', 'sv'),
- self::SYRIAC_CLASSICAL => array('syc'),
- self::SYRIAC => array('syr'),
- self::TAHITIAN => array('tah', 'ty'),
- self::TAI => array('tai'),
- self::TAMIL => array('tam', 'ta'),
- self::TATAR => array('tat', 'tt'),
- self::TELUGU => array('tel', 'te'),
- self::TIMNE => array('tem'),
- self::TERENO => array('ter'),
- self::TETUM => array('tet'),
- self::TAJIK => array('tgk', 'tg'),
- self::TAGALOG => array('tgl', 'tl'),
- self::THAI => array('tha', 'th'),
- self::TIGRE => array('tig'),
- self::TIGRINYA => array('tir', 'ti'),
- self::TIV => array('tiv'),
- self::TOKELAU => array('tkl'),
- self::KLINGON => array('tlh'),
- self::TLINGIT => array('tli'),
- self::TAMASHEK => array('tmh'),
- self::TONGA_NYASA => array('tog'),
- self::TONGA_ISLANDS => array('ton', 'to'),
- self::TOK_PISIN => array('tpi'),
- self::TSIMSHIAN => array('tsi'),
- self::TSWANA => array('tsn', 'tn'),
- self::TSONGA => array('tso', 'ts'),
- self::TURKMEN => array('tuk', 'tk'),
- self::TUMBUKA => array('tum'),
- self::TUPI => array('tup'),
- self::TURKISH => array('tur', 'tr'),
- self::ALTAIC => array('tut'),
- self::TUVALU => array('tvl'),
- self::TWI => array('twi', 'tw'),
- self::TUVINIAN => array('tyv'),
- self::UDMURT => array('udm'),
- self::UGARITIC => array('uga'),
- self::UIGHUR => array('uig', 'ug'),
- self::UKRAINIAN => array('ukr', 'uk'),
- self::UMBUNDU => array('umb'),
- self::UNDETERMINED => array('und'),
- self::URDU => array('urd', 'ur'),
- self::UZBEK => array('uzb', 'uz'),
- self::VAI => array('vai'),
- self::VENDA => array('ven', 've'),
- self::VIETNAMESE => array('vie', 'vi'),
- self::VOLAPUK => array('vol', 'vo'),
- self::VOTIC => array('vot'),
- self::WAKASHAN => array('wak'),
- self::WOLAITTA => array('wal'),
- self::WARAY => array('war'),
- self::WASHO => array('was'),
- self::SORBIAN => array('wen'),
- self::WALLOON => array('wln', 'wa'),
- self::WOLOF => array('wol', 'wo'),
- self::KALMYK => array('xal'),
- self::XHOSA => array('xho', 'xh'),
- self::YAO => array('yao'),
- self::YAPESE => array('yap'),
- self::YIDDISH => array('yid', 'yi'),
- self::YORUBA => array('yor', 'yo'),
- self::YUPIK => array('ypk'),
- self::ZAPOTEC => array('zap'),
- self::BLISSYMBOLS => array('zbl'),
- self::ZENAGA => array('zen'),
- self::MOROCCAN_TAMAZIGHT => array('zgh'),
- self::ZHUANG => array('zha', 'za'),
- self::ZANDE => array('znd'),
- self::ZULU => array('zul', 'zu'),
- self::ZUNI => array('zun'),
- self::NOT_APPLICABLE => array('zxx'),
- self::ZAZA => array('zza'),
- );
-
- private static $s_names = array(
- self::ENGLISH_US => array('US English'),
- self::ENGLISH => array('English'),
- self::ENGLISH_CA => array('Canadian English'),
- self::ENGLISH_GB => array('British English'),
- self::AFAR => array('Afar'),
- self::ABKHAZIAN => array('Abkhazian'),
- self::ACHINESE => array('Achinese'),
- self::ACOLI => array('Acoli'),
- self::ADANGME => array('Adangme'),
- self::ADYGHE => array('Adyghe'),
- self::AFRO_ASIATIC => array('Afro-Asiatic', 'Adygei'),
- self::AFRIHILI => array('Afrihili'),
- self::AFRIKAANS => array('Afrikaans'),
- self::AINU => array('Ainu'),
- self::AKAN => array('Akan'),
- self::AKKADIAN => array('Akkadian'),
- self::ALBANIAN => array('Albanian'),
- self::ALEUT => array('Aleut'),
- self::ALGONQUIAN => array('Algonquian'),
- self::SOUTHERN_ALTAI => array('Southern Altai'),
- self::AMHARIC => array('Amharic'),
- self::ENGLISH_OLD => array('Old English'),
- self::ANGIKA => array('Angika'),
- self::APACHE => array('Apache'),
- self::ARABIC => array('Arabic'),
- self::ARAMAIC => array('Official Aramaic', 'Imperial Aramaic'),
- self::ARAGONESE => array('Aragonese'),
- self::ARMENIAN => array('Armenian'),
- self::MAPUDUNGUN => array('Mapudungun', 'Mapuche'),
- self::ARAPAHO => array('Arapaho'),
- self::ARTIFICIAL => array('Artificial'),
- self::ARAWAK => array('Arawak'),
- self::ASSAMESE => array('Assamese'),
- self::ASTURIAN => array('Asturian', 'Bable', 'Leonese', 'Asturleonese'),
- self::ATHAPASCAN => array('Athapascan'),
- self::AUSTRALIAN => array('Australian'),
- self::AVARIC => array('Avaric'),
- self::AVESTAN => array('Avestan'),
- self::AWADHI => array('Awadhi'),
- self::AYMARA => array('Aymara'),
- self::AZERBAIJANI => array('Azerbaijani'),
- self::BANDA => array('Banda'),
- self::BAMILEKE => array('Bamileke'),
- self::BASHKIR => array('Bashkir'),
- self::BALUCHI => array('Baluchi'),
- self::BAMBARA => array('Bambara'),
- self::BALINESE => array('Balinese'),
- self::BASQUE => array('Basque'),
- self::BASA => array('Basa'),
- self::BALTIC => array('Baltic'),
- self::BEJA => array('Beja'),
- self::BELARUSIAN => array('Belarusian'),
- self::BEMBA => array('Bemba'),
- self::BENGALI => array('Bengali'),
- self::BERBER => array('Berber'),
- self::BHOJPURI => array('Bhojpuri'),
- self::BIHARI => array('Bihari'),
- self::BIKOL => array('Bikol'),
- self::BINI => array('Bini', 'Edo'),
- self::BISLAMA => array('Bislama'),
- self::SIKSIKA => array('Siksika'),
- self::BANTU => array('Bantu'),
- self::TIBETAN => array('Tibetan'),
- self::BOSNIAN => array('Bosnian'),
- self::BRAJ => array('Braj'),
- self::BRETON => array('Breton'),
- self::BATAK => array('Batak'),
- self::BURIAT => array('Buriat'),
- self::BUGINESE => array('Buginese'),
- self::BULGARIAN => array('Bulgarian'),
- self::BURMESE => array('Burmese'),
- self::BLIN => array('Blin', 'Bilin'),
- self::CADDO => array('Caddo'),
- self::AMERICAN_INDIAN_CENTRAL => array('Central American Indian'),
- self::GALIBI_CARIB => array('Galibi Carib'),
- self::CATALAN => array('Catalan', 'Valencian'),
- self::CAUCASIAN => array('Caucasian'),
- self::CEBUANO => array('Cebuano'),
- self::CELTIC => array('Celtic'),
- self::CZECH => array('Czech'),
- self::CHAMORRO => array('Chamorro'),
- self::CHIBCHA => array('Chibcha'),
- self::CHECHEN => array('Chechen'),
- self::CHAGATAI => array('Chagatai'),
- self::CHINESE => array('Chinese'),
- self::CHUUKESE => array('Chuukese'),
- self::MARI => array('Mari'),
- self::CHINOOK_JARGON => array('Chinook jargon'),
- self::CHOCTAW => array('Choctaw'),
- self::CHIPEWYAN => array('Chipewyan', 'Dene Suline'),
- self::CHEROKEE => array('Cherokee'),
- self::CHURCH_SLAVIC => array('Church Slavic', 'Old Slavonic', 'Church Slavonic', 'Old Bulgarian', 'Old Church Slavonic'),
- self::CHUVASH => array('Chuvash'),
- self::CHEYENNE => array('Cheyenne'),
- self::CHAMIC => array('Chamic'),
- self::COPTIC => array('Coptic'),
- self::CORNISH => array('Cornish'),
- self::CORSICAN => array('Corsican'),
- self::CREOLES_ENGLISH => array('Creoles and Pidgins, English Based'),
- self::CREOLES_FRENCH => array('Creoles and Pidgins, French Based'),
- self::CREOLES_PORTUGESE => array('Creoles and Pidgins, Portugese Based'),
- self::CREE => array('Cree'),
- self::CRIMEAN_TATAR => array('Crimean Tatar', 'Crimean Turkish'),
- self::CREOLES => array('Creoles and Pidgins'),
- self::KASHUBIAN => array('Kashubian'),
- self::CUSHITIC => array('Cushitic'),
- self::WELSH => array('Welsh'),
- self::DAKOTA => array('Dakota'),
- self::DANISH => array('Danish'),
- self::DARGWA => array('Dargwa'),
- self::LAND_DAYAK => array('Land Dayak'),
- self::DELAWARE => array('Delaware'),
- self::SLAVE => array('Athapascan Slave'),
- self::GERMAN => array('German'),
- self::DOGRIB => array('Dogrib'),
- self::DINKA => array('Dinka'),
- self::DIVEHI => array('Divehi', 'Dhivehi', 'Maldivian'),
- self::DOGRI => array('Dogri'),
- self::DRAVIDIAN => array('Dravidian'),
- self::LOWER_SORBIAN => array('Lower Sorbian'),
- self::DUALA => array('Duala'),
- self::DUTCH_MIDDLE => array('Middle Dutch'),
- self::DUTCH_FLEMISH => array('Dutch', 'Flemish'),
- self::DYULA => array('Dyula'),
- self::DZONGKHA => array('Dzongkha'),
- self::EFIK => array('Efik'),
- self::EGYPTIAN => array('Ancient Egyptian'),
- self::EKAJUK => array('Ekajuk'),
- self::GREEK_MODERN => array('Modern Greek'),
- self::ELAMITE => array('Elamite'),
- self::ENGLISH_MIDDLE => array('Middle English'),
- self::ESPERANTO => array('Esperanto'),
- self::ESTONIAN => array('Estonian'),
- self::EWE => array('Ewe'),
- self::EWONDO => array('Ewondo'),
- self::FANG => array('Fang'),
- self::FAROESE => array('Faroese'),
- self::PERSIAN => array('Persian'),
- self::FANTI => array('Fanti'),
- self::FIJIAN => array('Fijian'),
- self::FILIPINO => array('Filipino', 'Pilipino'),
- self::FINNISH => array('Finnish'),
- self::FINNO_UGRIAN => array('Finno-Ugrian '),
- self::FON => array('Fon'),
- self::FRENCH => array('French'),
- self::FRENCH_MIDDLE => array('Middle French'),
- self::FRENCH_OLD => array('Old French'),
- self::FRISIAN_NORTHERN => array('Northern Frisian'),
- self::FRISIAN_EASTERN => array('Eastern Frisian'),
- self::FRISIAN_WESTERN => array('Southern Frisian'),
- self::FULAH => array('Fulah'),
- self::FRIULIAN => array('Friulian'),
- self::GA => array('Ga'),
- self::GAYO => array('Gayo'),
- self::GBAYA => array('Gbaya'),
- self::GERMANIC => array('Germanic'),
- self::GEORGIAN => array('Georgian'),
- self::GEEZ => array('Geez'),
- self::GILBERTESE => array('Gilbertese'),
- self::GAELIC => array('Gaelic', 'Scottish Gaelic'),
- self::IRISH => array('Irish'),
- self::GALICIAN => array('Galician'),
- self::MANX => array('Manx'),
- self::GERMAN_MIDDLE_HIGH => array('Middle High German'),
- self::GERMAN_OLD_HIGH => array('Old High German'),
- self::GONDI => array('Gondi'),
- self::GORONTALO => array('Gorontalo'),
- self::GOTHIC => array('Gothic'),
- self::GREBO => array('Grebo'),
- self::GREEK_ANCIENT => array('Ancient Greek'),
- self::GUARANI => array('Guarani'),
- self::GERMAN_SWISS => array('Swiss German', 'Alemannic', 'Alsatian'),
- self::GUJARATI => array('Gujarati'),
- self::GWICHIN => array('Gwich\'in'),
- self::HAIDA => array('Haida'),
- self::HAITIAN => array('Haitian', 'Haitian Creole'),
- self::HAUSA => array('Hausa'),
- self::HAWAIIAN => array('Hawaiian'),
- self::HEBREW => array('Hebrew'),
- self::HERERO => array('Herero'),
- self::HILIGAYNON => array('Hiligaynon'),
- self::HIMACHALI => array('Himachali', 'Western Pahari'),
- self::HINDI => array('Hindi'),
- self::HITTITE => array('Hittite'),
- self::HMONG => array('Hmong', 'Mong'),
- self::HIRI_MOTU => array('Hiri Motu'),
- self::CROATIAN => array('Croatian'),
- self::SORBIAN_UPPER => array('Upper Sorbian'),
- self::HUNGARIAN => array('Hungarian'),
- self::HUPA => array('Hupa'),
- self::IBAN => array('Iban'),
- self::IGBO => array('Igbo'),
- self::ICELANDIC => array('Icelandic'),
- self::IDO => array('Ido'),
- self::SICHUAN_YI => array('Sichuan Yi', 'Nuosu'),
- self::IJO => array('Ijo'),
- self::INUKTITUT => array('Inuktitut'),
- self::INTERLINGUE => array('Interlingue'),
- self::ILOKO => array('Iloko'),
- self::INTERLINGUA => array('Interlingua'),
- self::INDIC => array('Indic'),
- self::INDONESIAN => array('Indonesian'),
- self::INDO_EUROPEAN => array('Indo-European'),
- self::INGUSH => array('Ingush'),
- self::INUPIAQ => array('Inupiaq'),
- self::IRANIAN => array('Iranian'),
- self::IROQUOIAN => array('Iroquoian'),
- self::ITALIAN => array('Italian'),
- self::JAVANESE => array('Javanese'),
- self::LOJBAN => array('Lojban'),
- self::JAPANESE => array('Japanese'),
- self::JUDEO_PERSIAN => array('Judeo-Persian'),
- self::JUDEO_ARABIC => array('Judeo-Arabic'),
- self::KARA_KALPAK => array('Kara-Kalpak'),
- self::KABYLE => array('Kabyle'),
- self::KACHIN => array('Kachin', 'Jingpho'),
- self::KALAALLISUT => array('Kalaallisut', 'Greenlandic'),
- self::KAMBA => array('Kamba'),
- self::KANNADA => array('Kannada'),
- self::KAREN => array('Karen'),
- self::KASHMIRI => array('Kashmiri'),
- self::KANURI => array('Kanuri'),
- self::KAWI => array('Kawi'),
- self::KAZAKH => array('Kazakh'),
- self::KABARDIAN => array('Kabardian'),
- self::KHASI => array('Khasi'),
- self::KHOISAN => array('Khoisan'),
- self::CENTRAL_KHMER => array('Central Khmer'),
- self::KHOTANESE => array('Khotanese', 'Sakan'),
- self::KIKUYU => array('Kikuyu', 'Gikuyu'),
- self::KINYARWANDA => array('Kinyarwanda'),
- self::KIRGHIZ => array('Kirghiz', 'Kyrgyz'),
- self::KIMBUNDU => array('Kimbundu'),
- self::KONKANI => array('Konkani'),
- self::KOMI => array('Komi'),
- self::KONGO => array('Kongo'),
- self::KOREAN => array('Korean'),
- self::KOSRAEAN => array('Kosraean'),
- self::KPELLE => array('Kpelle'),
- self::KARACHAY_BALKAR => array('Karachay-Balkar'),
- self::KARELIAN => array('Karelian'),
- self::KRU => array('Kru'),
- self::KURUKH => array('Kurukh'),
- self::KUANYAMA => array('Kuanyama', 'Kwanyama'),
- self::KUMYK => array('Kumyk'),
- self::KURDISH => array('Kurdish'),
- self::KUTENAI => array('Kutenai'),
- self::LADINO => array('Ladino'),
- self::LAHNDA => array('Lahnda'),
- self::LAMBA => array('Lamba'),
- self::LAO => array('Lao'),
- self::LATIN => array('Latin'),
- self::LATVIAN => array('Latvian'),
- self::LEZGHIAN => array('Lezghian'),
- self::LIMBURGAN => array('Limburgan', 'Limburger', 'Limburgish'),
- self::LINGALA => array('Lingala'),
- self::LITHUANIAN => array('Lithuanian'),
- self::MONGO => array('Mongo'),
- self::LOZI => array('Lozi'),
- self::LUXEMBOURGISH => array('Luxembourgish', 'Letzeburgesch'),
- self::LUBA_LULUA => array('Luba-Lulua'),
- self::LUBA_KATANGA => array('Luba-Katanga'),
- self::GANDA => array('Ganda'),
- self::LUISENO => array('Luiseno'),
- self::LUNDA => array('Lunda'),
- self::LUO => array('Luo'),
- self::LUSHAI => array('Lushai'),
- self::MACEDONIAN => array('Macedonian'),
- self::MADURESE => array('Madurese'),
- self::MAGAHI => array('Magahi'),
- self::MARSHALLESE => array('Marshallese'),
- self::MAITHILI => array('Maithili'),
- self::MAKASAR => array('Makasar'),
- self::MALAYALAM => array('Malayalam'),
- self::MANDINGO => array('Mandingo'),
- self::MAORI => array('Maori'),
- self::AUSTRONESIAN => array('Austronesian'),
- self::MARATHI => array('Marathi'),
- self::MASAI => array('Masai'),
- self::MALAY => array('Malay'),
- self::MOKSHA => array('Moksha'),
- self::MANDAR => array('Mandar'),
- self::MENDE => array('Mende'),
- self::IRISH_MIDDLE => array('Middle Irish'),
- self::MIKMAQ => array('Mi\'kmaq', 'Micmac'),
- self::MINANGKABAU => array('Minangkabau'),
- self::UNCODED => array('Uncoded'),
- self::MON_KHMER => array('Mon-Khmer'),
- self::MALAGASY => array('Malagasy'),
- self::MALTESE => array('Maltese'),
- self::MANCHU => array('Manchu'),
- self::MANIPURI => array('Manipuri'),
- self::MANOBO => array('Manobo'),
- self::MOHAWK => array('Mohawk'),
- self::MONGOLIAN => array('Mongolian'),
- self::MOSSI => array('Mossi'),
- self::MULTIPLE => array('Multiple'),
- self::MUNDA => array('Munda'),
- self::CREEK => array('Creek'),
- self::MIRANDESE => array('Mirandese'),
- self::MARWARI => array('Marwari'),
- self::MAYAN => array('Mayan'),
- self::ERZYA => array('Erzya'),
- self::NAHUATL => array('Nahuatl'),
- self::AMERICAN_INDIAN_NORTH => array('North American Indian'),
- self::NEAPOLITAN => array('Neapolitan'),
- self::NAURU => array('Nauru'),
- self::NAVAJO => array('Navajo', 'Navaho'),
- self::NDEBELE_SOUTH => array('South Ndebele'),
- self::NDEBELE_NORTH => array('North Ndebele'),
- self::NDONGA => array('Ndonga'),
- self::LOW_GERMAN => array('Low German', 'Low Saxon'),
- self::NEPALI => array('Nepali'),
- self::NEPAL_BHASA => array('Nepal Bhasa', 'Newari'),
- self::NIAS => array('Nias'),
- self::NIGER_KORDOFANIAN => array('Niger-Kordofanian'),
- self::NIUEAN => array('Niuean'),
- self::NORWEGIAN_NYNORSK => array('Norwegian Nynorsk'),
- self::BOKMAL => array('Bokmål', 'Norwegian Bokmål'),
- self::NOGAI => array('Nogai'),
- self::NORSE_OLD => array('Old Norse'),
- self::NORWEGIAN => array('Norwegian'),
- self::NKO => array('N\'Ko'),
- self::PEDI => array('Pedi', 'Sepedi', 'Northern Sotho'),
- self::NUBIAN => array('Nubian'),
- self::CLASSICAL_NEWARI => array('Classical Newari', 'Old Newari', 'Classical Nepal Bhasa'),
- self::CHICHEWA => array('Chichewa', 'Chewa', 'Nyanja'),
- self::NYAMWEZI => array('Nyamwezi'),
- self::NYANKOLE => array('Nyankole'),
- self::NYORO => array('Nyoro'),
- self::NZIMA => array('Nzima'),
- self::OCCITAN => array('Occitan'),
- self::OJIBWA => array('Ojibwa'),
- self::ORIYA => array('Oriya'),
- self::OROMO => array('Oromo'),
- self::OSAGE => array('Osage'),
- self::OSSETIAN => array('Ossetian', 'Ossetic'),
- self::OTTOMAN => array('Ottoman Turkish'),
- self::OTOMIAN => array('Otomian'),
- self::PAPUAN => array('Papuan'),
- self::PANGASINAN => array('Pangasinan'),
- self::PAHLAVI => array('Pahlavi'),
- self::PAMPANGA => array('Pampanga', 'Kapampangan'),
- self::PANJABI => array('Panjabi', 'Punjabi'),
- self::PAPIAMENTO => array('Papiamento'),
- self::PALAUAN => array('Palauan'),
- self::PERSIAN_OLD => array('Old Persian'),
- self::PHILIPPINE => array('Philippine'),
- self::PHOENICIAN => array('Phoenician'),
- self::PALI => array('Pali'),
- self::POLISH => array('Polish'),
- self::POHNPEIAN => array('Pohnpeian'),
- self::PORTUGUESE => array('Portuguese'),
- self::PRAKRIT => array('Prakrit'),
- self::PROVENCAL => array('Old Provençal', 'Old Occitan'),
- self::PUSHTO => array('Pushto', 'Pashto'),
- self::QUECHUA => array('Quechua'),
- self::RAJASTHANI => array('Rajasthani'),
- self::RAPANUI => array('Rapanui'),
- self::RAROTONGAN => array('Rarotongan', 'Cook Islands Maori'),
- self::ROMANCE => array('Romance'),
- self::ROMANSH => array('Romansh'),
- self::ROMANY => array('Romany'),
- self::ROMANIAN => array('Romanian', 'Moldavian', 'Moldovan'),
- self::RUNDI => array('Rundi'),
- self::AROMANIAN => array('Aromanian', 'Arumanian', 'Macedo-Romanian'),
- self::RUSSIAN => array('Russian'),
- self::SANDAWE => array('Sandawe'),
- self::SANGO => array('Sango'),
- self::YAKUT => array('Yakut'),
- self::AMERICAN_INDIAN_SOUTH => array('South American Indian'),
- self::SALISHAN => array('Salishan'),
- self::SAMARITAN => array('Samaritan'),
- self::SANSKRIT => array('Sanskrit'),
- self::SASAK => array('Sasak'),
- self::SANTALI => array('Santali'),
- self::SICILIAN => array('Sicilian'),
- self::SCOTS => array('Scots'),
- self::SELKUP => array('Selkup'),
- self::SEMITIC => array('Semitic'),
- self::IRISH_OLD => array('Old Irish'),
- self::SIGN => array('Sign Language'),
- self::SHAN => array('Shan'),
- self::SIDAMO => array('Sidamo'),
- self::SINHALA => array('Sinhala', 'Sinhalese'),
- self::SIOUAN => array('Siouan'),
- self::SINO_TIBETAN => array('Sino-Tibetan'),
- self::SLAVIC => array('Slavic'),
- self::SLOVAK => array('Slovak'),
- self::SLOVENIAN => array('Slovenian'),
- self::SAMI_SOUTHERN => array('Southern Sami'),
- self::SAMI_NORTHERN => array('Northern Sami'),
- self::SAMI => array('Sami'),
- self::SAMI_LULE => array('Lule Sami'),
- self::SAMI_IRARI => array('Inari Sami'),
- self::SAMOAN => array('Samoan'),
- self::SAMI_SKOLT => array('Skolt Sami'),
- self::SHONA => array('Shona'),
- self::SINDHI => array('Sindhi'),
- self::SONINKE => array('Soninke'),
- self::SOGDIAN => array('Sogdian'),
- self::SOMALI => array('Somali'),
- self::SONGHAI => array('Songhai'),
- self::SOTHO_SOUTHERN => array('Southern Sotho'),
- self::SPANISH => array('Spanish', 'Castilian'),
- self::SARDINIAN => array('Sardinian'),
- self::SRANAN_TONGO => array('Sranan Tongo'),
- self::SERBIAN => array('Serbian'),
- self::SERER => array('Serer'),
- self::NILO_SAHARAN => array('Nilo-Saharan'),
- self::SWATI => array('Swati'),
- self::SUKUMA => array('Sukuma'),
- self::SUNDANESE => array('Sundanese'),
- self::SUSU => array('Susu'),
- self::SUMERIAN => array('Sumerian'),
- self::SWAHILI => array('Swahili'),
- self::SWEDISH => array('Swedish'),
- self::SYRIAC_CLASSICAL => array('Classical Syriac'),
- self::SYRIAC => array('Syriac'),
- self::TAHITIAN => array('Tahitian'),
- self::TAI => array('Tai'),
- self::TAMIL => array('Tamil'),
- self::TATAR => array('Tatar'),
- self::TELUGU => array('Telugu'),
- self::TIMNE => array('Timne'),
- self::TERENO => array('Tereno'),
- self::TETUM => array('Tetum'),
- self::TAJIK => array('Tajik'),
- self::TAGALOG => array('Tagalog'),
- self::THAI => array('Thai'),
- self::TIGRE => array('Tigre'),
- self::TIGRINYA => array('Tigrinya'),
- self::TIV => array('Tiv'),
- self::TOKELAU => array('Tokelau'),
- self::KLINGON => array('Klingon', 'tlhIngan-Hol'),
- self::TLINGIT => array('Tlingit'),
- self::TAMASHEK => array('Tamashek'),
- self::TONGA_NYASA => array('Nyasa Tonga'),
- self::TONGA_ISLANDS => array('Tonga Islands Tonga', 'to'),
- self::TOK_PISIN => array('Tok Pisin'),
- self::TSIMSHIAN => array('Tsimshian'),
- self::TSWANA => array('Tswana'),
- self::TSONGA => array('Tsonga'),
- self::TURKMEN => array('Turkmen'),
- self::TUMBUKA => array('Tumbuka'),
- self::TUPI => array('Tupi'),
- self::TURKISH => array('Turkish'),
- self::ALTAIC => array('Altaic'),
- self::TUVALU => array('Tuvalu'),
- self::TWI => array('Twi'),
- self::TUVINIAN => array('Tuvinian'),
- self::UDMURT => array('Udmurt'),
- self::UGARITIC => array('Ugaritic'),
- self::UIGHUR => array('Uighur', 'Uyghur'),
- self::UKRAINIAN => array('Ukrainian'),
- self::UMBUNDU => array('Umbundu'),
- self::UNDETERMINED => array('Undetermined'),
- self::URDU => array('Urdu'),
- self::UZBEK => array('Uzbek'),
- self::VAI => array('Vai'),
- self::VENDA => array('Venda'),
- self::VIETNAMESE => array('Vietnamese'),
- self::VOLAPUK => array('Volapük'),
- self::VOTIC => array('Votic'),
- self::WAKASHAN => array('Wakashan'),
- self::WOLAITTA => array('Wolaitta', 'Wolaytta'),
- self::WARAY => array('Waray'),
- self::WASHO => array('Washo'),
- self::SORBIAN => array('Sorbian'),
- self::WALLOON => array('Walloon'),
- self::WOLOF => array('Wolof'),
- self::KALMYK => array('Kalmyk', 'Oirat'),
- self::XHOSA => array('Xhosa'),
- self::YAO => array('Yao'),
- self::YAPESE => array('Yapese'),
- self::YIDDISH => array('Yiddish'),
- self::YORUBA => array('Yoruba'),
- self::YUPIK => array('Yupik'),
- self::ZAPOTEC => array('Zapotec'),
- self::BLISSYMBOLS => array('Blissymbols', 'Blissymbolics', 'Bliss'),
- self::ZENAGA => array('Zenaga'),
- self::MOROCCAN_TAMAZIGHT => array('Standard Moroccan Tamazight'),
- self::ZHUANG => array('Zhuang', 'Chuang'),
- self::ZANDE => array('Zande'),
- self::ZULU => array('Zulu'),
- self::ZUNI => array('Zuni'),
- self::NOT_APPLICABLE => array('No Linguistic Content', 'Not Applicable'),
- self::ZAZA => array('Zaza', 'Dimili', 'Dimli', 'Kirdki', 'Kirmanjki', 'Zazaki'),
- );
-
- private static $s_ids = array(
+ private static $s_aliases = [
+ self::ENGLISH_US => ['en-us'],
+ self::ENGLISH => ['eng', 'en'],
+ self::ENGLISH_CA => ['en-ca'],
+ self::ENGLISH_GB => ['en-gb'],
+ self::AFAR => ['aar', 'aa'],
+ self::ABKHAZIAN => ['abk', 'ab'],
+ self::ACHINESE => ['ace'],
+ self::ACOLI => ['ach'],
+ self::ADANGME => ['ada'],
+ self::ADYGHE => ['ady'],
+ self::AFRO_ASIATIC => ['afa'],
+ self::AFRIHILI => ['afh'],
+ self::AFRIKAANS => ['afr', 'af'],
+ self::AINU => ['ain'],
+ self::AKAN => ['aka', 'ak'],
+ self::AKKADIAN => ['akk'],
+ self::ALBANIAN => ['alb', 'sqi', 'sq'],
+ self::ALEUT => ['ale'],
+ self::ALGONQUIAN => ['alg'],
+ self::SOUTHERN_ALTAI => ['alt'],
+ self::AMHARIC => ['amh', 'am'],
+ self::ENGLISH_OLD => ['ang'],
+ self::ANGIKA => ['anp'],
+ self::APACHE => ['apa'],
+ self::ARABIC => ['ara', 'ar'],
+ self::ARAMAIC => ['arc'],
+ self::ARAGONESE => ['arg', 'an'],
+ self::ARMENIAN => ['arm', 'hye', 'hy'],
+ self::MAPUDUNGUN => ['am'],
+ self::ARAPAHO => ['arp'],
+ self::ARTIFICIAL => ['art'],
+ self::ARAWAK => ['arw'],
+ self::ASSAMESE => ['asm', 'as'],
+ self::ASTURIAN => ['ast'],
+ self::ATHAPASCAN => ['ath'],
+ self::AUSTRALIAN => ['aus'],
+ self::AVARIC => ['ava', 'av'],
+ self::AVESTAN => ['ave', 'ae'],
+ self::AWADHI => ['awa'],
+ self::AYMARA => ['aym', 'ay'],
+ self::AZERBAIJANI => ['aze', 'az'],
+ self::BANDA => ['bad'],
+ self::BAMILEKE => ['bai'],
+ self::BASHKIR => ['bak', 'ba'],
+ self::BALUCHI => ['bal'],
+ self::BAMBARA => ['bam', 'bm'],
+ self::BALINESE => ['ban'],
+ self::BASQUE => ['baq', 'eus', 'eu'],
+ self::BASA => ['bas'],
+ self::BALTIC => ['bat'],
+ self::BEJA => ['bej'],
+ self::BELARUSIAN => ['bel', 'be'],
+ self::BEMBA => ['bem'],
+ self::BENGALI => ['ben', 'bn'],
+ self::BERBER => ['ber'],
+ self::BHOJPURI => ['bho'],
+ self::BIHARI => ['bih', 'bh'],
+ self::BIKOL => ['bik'],
+ self::BINI => ['bin'],
+ self::BISLAMA => ['bis', 'bi'],
+ self::SIKSIKA => ['bla'],
+ self::BANTU => ['bnt'],
+ self::TIBETAN => ['tib', 'bod', 'bo'],
+ self::BOSNIAN => ['bos', 'bs'],
+ self::BRAJ => ['bra'],
+ self::BRETON => ['bre'],
+ self::BATAK => ['btk'],
+ self::BURIAT => ['bua'],
+ self::BUGINESE => ['bug'],
+ self::BULGARIAN => ['bul'],
+ self::BURMESE => ['bur', 'mya', 'my'],
+ self::BLIN => ['byn'],
+ self::CADDO => ['cad'],
+ self::AMERICAN_INDIAN_CENTRAL => ['cai'],
+ self::GALIBI_CARIB => ['car'],
+ self::CATALAN => ['cat', 'ca'],
+ self::CAUCASIAN => ['cau'],
+ self::CEBUANO => ['ceb'],
+ self::CELTIC => ['cel'],
+ self::CZECH => ['cze', 'ces', 'cs'],
+ self::CHAMORRO => ['cha', 'ch'],
+ self::CHIBCHA => ['chb'],
+ self::CHECHEN => ['che', 'ce'],
+ self::CHAGATAI => ['chg'],
+ self::CHINESE => ['chi', 'zho', 'zh'],
+ self::CHUUKESE => ['chk'],
+ self::MARI => ['chm'],
+ self::CHINOOK_JARGON => ['chn'],
+ self::CHOCTAW => ['cho'],
+ self::CHIPEWYAN => ['chp'],
+ self::CHEROKEE => ['chr'],
+ self::CHURCH_SLAVIC => ['chu', 'cu'],
+ self::CHUVASH => ['chv', 'cv'],
+ self::CHEYENNE => ['chy'],
+ self::CHAMIC => ['cmc'],
+ self::COPTIC => ['cop'],
+ self::CORNISH => ['cor'],
+ self::CORSICAN => ['cos', 'co'],
+ self::CREOLES_ENGLISH => ['cpe'],
+ self::CREOLES_FRENCH => ['cpf'],
+ self::CREOLES_PORTUGESE => ['cpp'],
+ self::CREE => ['cre', 'cr'],
+ self::CRIMEAN_TATAR => ['crh'],
+ self::CREOLES => ['crp'],
+ self::KASHUBIAN => ['csb'],
+ self::CUSHITIC => ['cus'],
+ self::WELSH => ['wel', 'cym', 'cy'],
+ self::DAKOTA => ['dak'],
+ self::DANISH => ['dan', 'da'],
+ self::DARGWA => ['dar'],
+ self::LAND_DAYAK => ['day'],
+ self::DELAWARE => ['del'],
+ self::SLAVE => ['den'],
+ self::GERMAN => ['ger', 'deu', 'de'],
+ self::DOGRIB => ['dgr'],
+ self::DINKA => ['din'],
+ self::DIVEHI => ['div', 'dv'],
+ self::DOGRI => ['doi'],
+ self::DRAVIDIAN => ['dra'],
+ self::LOWER_SORBIAN => ['dsb'],
+ self::DUALA => ['dua'],
+ self::DUTCH_MIDDLE => ['dum'],
+ self::DUTCH_FLEMISH => ['dut', 'nld', 'nl'],
+ self::DYULA => ['dyu'],
+ self::DZONGKHA => ['dzo', 'dz'],
+ self::EFIK => ['efi'],
+ self::EGYPTIAN => ['egy'],
+ self::EKAJUK => ['eka'],
+ self::GREEK_MODERN => ['gre', 'ell', 'el'],
+ self::ELAMITE => ['elx'],
+ self::ENGLISH_MIDDLE => ['enm'],
+ self::ESPERANTO => ['epo', 'eo'],
+ self::ESTONIAN => ['est', 'et'],
+ self::EWE => ['ewe', 'ee'],
+ self::EWONDO => ['ewo'],
+ self::FANG => ['fan'],
+ self::FAROESE => ['fao', 'fo'],
+ self::PERSIAN => ['per', 'fas', 'fa'],
+ self::FANTI => ['fat'],
+ self::FIJIAN => ['fij', 'fj'],
+ self::FILIPINO => ['fil'],
+ self::FINNISH => ['fin', 'fi'],
+ self::FINNO_UGRIAN => ['fiu'],
+ self::FON => ['fon'],
+ self::FRENCH => ['fre', 'fra', 'fr'],
+ self::FRENCH_MIDDLE => ['frm'],
+ self::FRENCH_OLD => ['fro'],
+ self::FRISIAN_NORTHERN => ['frr'],
+ self::FRISIAN_EASTERN => ['frs'],
+ self::FRISIAN_WESTERN => ['fry', 'fy'],
+ self::FULAH => ['ful', 'ff'],
+ self::FRIULIAN => ['fur'],
+ self::GA => ['gaa'],
+ self::GAYO => ['gay'],
+ self::GBAYA => ['gba'],
+ self::GERMANIC => ['gem'],
+ self::GEORGIAN => ['geo', 'kat', 'ka'],
+ self::GEEZ => ['gez'],
+ self::GILBERTESE => ['gil'],
+ self::GAELIC => ['gla', 'gd'],
+ self::IRISH => ['gle', 'ga'],
+ self::GALICIAN => ['glg', 'gl'],
+ self::MANX => ['glv', 'gv'],
+ self::GERMAN_MIDDLE_HIGH => ['gmh'],
+ self::GERMAN_OLD_HIGH => ['goh'],
+ self::GONDI => ['gon'],
+ self::GORONTALO => ['gor'],
+ self::GOTHIC => ['got'],
+ self::GREBO => ['grb'],
+ self::GREEK_ANCIENT => ['grc'],
+ self::GUARANI => ['grm', 'gn'],
+ self::GERMAN_SWISS => ['gsw'],
+ self::GUJARATI => ['guj', 'gu'],
+ self::GWICHIN => ['gwi'],
+ self::HAIDA => ['hai'],
+ self::HAITIAN => ['hat', 'ht'],
+ self::HAUSA => ['hau', 'ha'],
+ self::HAWAIIAN => ['haw'],
+ self::HEBREW => ['heb', 'he'],
+ self::HERERO => ['her', 'hz'],
+ self::HILIGAYNON => ['hil'],
+ self::HIMACHALI => ['him'],
+ self::HINDI => ['hin', 'hi'],
+ self::HITTITE => ['hit'],
+ self::HMONG => ['hmn'],
+ self::HIRI_MOTU => ['hmo', 'ho'],
+ self::CROATIAN => ['hrv'],
+ self::SORBIAN_UPPER => ['hsb'],
+ self::HUNGARIAN => ['hun', 'hu'],
+ self::HUPA => ['hup'],
+ self::IBAN => ['iba'],
+ self::IGBO => ['ibo', 'ig'],
+ self::ICELANDIC => ['ice', 'isl', 'is'],
+ self::IDO => ['ido', 'io'],
+ self::SICHUAN_YI => ['iii', 'ii'],
+ self::IJO => ['ijo'],
+ self::INUKTITUT => ['iku', 'iu'],
+ self::INTERLINGUE => ['ile', 'ie'],
+ self::ILOKO => ['ilo'],
+ self::INTERLINGUA => ['ina', 'ia'],
+ self::INDIC => ['inc'],
+ self::INDONESIAN => ['ind', 'id'],
+ self::INDO_EUROPEAN => ['ine'],
+ self::INGUSH => ['inh'],
+ self::INUPIAQ => ['ipk', 'ik'],
+ self::IRANIAN => ['ira'],
+ self::IROQUOIAN => ['iro'],
+ self::ITALIAN => ['ita', 'it'],
+ self::JAVANESE => ['jav', 'jv'],
+ self::LOJBAN => ['jbo'],
+ self::JAPANESE => ['jpn', 'ja'],
+ self::JUDEO_PERSIAN => ['jpr'],
+ self::JUDEO_ARABIC => ['jrb'],
+ self::KARA_KALPAK => ['kaa'],
+ self::KABYLE => ['kab'],
+ self::KACHIN => ['kac'],
+ self::KALAALLISUT => ['kal', 'kl'],
+ self::KAMBA => ['kam'],
+ self::KANNADA => ['kan', 'kn'],
+ self::KAREN => ['kar'],
+ self::KASHMIRI => ['kas', 'ks'],
+ self::KANURI => ['kau', 'kr'],
+ self::KAWI => ['kaw'],
+ self::KAZAKH => ['kaz'],
+ self::KABARDIAN => ['kbd'],
+ self::KHASI => ['kha'],
+ self::KHOISAN => ['khi'],
+ self::CENTRAL_KHMER => ['khm', 'km'],
+ self::KHOTANESE => ['kho'],
+ self::KIKUYU => ['kik', 'ki'],
+ self::KINYARWANDA => ['kin', 'rw'],
+ self::KIRGHIZ => ['kir', 'ky'],
+ self::KIMBUNDU => ['kmb'],
+ self::KONKANI => ['kok'],
+ self::KOMI => ['kom', 'kv'],
+ self::KONGO => ['kon', 'kg'],
+ self::KOREAN => ['kor', 'ko'],
+ self::KOSRAEAN => ['kos'],
+ self::KPELLE => ['kpe'],
+ self::KARACHAY_BALKAR => ['krc'],
+ self::KARELIAN => ['krl'],
+ self::KRU => ['kro'],
+ self::KURUKH => ['kru'],
+ self::KUANYAMA => ['kua', 'kj'],
+ self::KUMYK => ['kum'],
+ self::KURDISH => ['kur', 'ku'],
+ self::KUTENAI => ['kut'],
+ self::LADINO => ['lad'],
+ self::LAHNDA => ['lah'],
+ self::LAMBA => ['lam'],
+ self::LAO => ['lao', 'lo'],
+ self::LATIN => ['lat', 'la'],
+ self::LATVIAN => ['lav', 'lv'],
+ self::LEZGHIAN => ['lez'],
+ self::LIMBURGAN => ['lim', 'li'],
+ self::LINGALA => ['lin', 'ln'],
+ self::LITHUANIAN => ['lit', 'lt'],
+ self::MONGO => ['lol'],
+ self::LOZI => ['loz'],
+ self::LUXEMBOURGISH => ['ltz', 'lb'],
+ self::LUBA_LULUA => ['lua'],
+ self::LUBA_KATANGA => ['lub', 'lu'],
+ self::GANDA => ['lug', 'lg'],
+ self::LUISENO => ['lui'],
+ self::LUNDA => ['lun'],
+ self::LUO => ['luo'],
+ self::LUSHAI => ['lus'],
+ self::MACEDONIAN => ['mac', 'mkd', 'mk'],
+ self::MADURESE => ['mad'],
+ self::MAGAHI => ['mag'],
+ self::MARSHALLESE => ['mah'],
+ self::MAITHILI => ['mai'],
+ self::MAKASAR => ['mak'],
+ self::MALAYALAM => ['mal'],
+ self::MANDINGO => ['man'],
+ self::MAORI => ['mao', 'mri', 'mi'],
+ self::AUSTRONESIAN => ['map'],
+ self::MARATHI => ['mar', 'mr'],
+ self::MASAI => ['mas'],
+ self::MALAY => ['may', 'msa', 'ms'],
+ self::MOKSHA => ['mdf'],
+ self::MANDAR => ['mdr'],
+ self::MENDE => ['men'],
+ self::IRISH_MIDDLE => ['mga'],
+ self::MIKMAQ => ['mic'],
+ self::MINANGKABAU => ['min'],
+ self::UNCODED => ['mis'],
+ self::MON_KHMER => ['mkh'],
+ self::MALAGASY => ['mlg'],
+ self::MALTESE => ['mlt'],
+ self::MANCHU => ['mnc'],
+ self::MANIPURI => ['mni'],
+ self::MANOBO => ['mno'],
+ self::MOHAWK => ['moh'],
+ self::MONGOLIAN => ['mon', 'mn'],
+ self::MOSSI => ['mos'],
+ self::MULTIPLE => ['mul'],
+ self::MUNDA => ['mun'],
+ self::CREEK => ['mus'],
+ self::MIRANDESE => ['mwl'],
+ self::MARWARI => ['mwr'],
+ self::MAYAN => ['myn'],
+ self::ERZYA => ['myv'],
+ self::NAHUATL => ['nah'],
+ self::AMERICAN_INDIAN_NORTH => ['nai'],
+ self::NEAPOLITAN => ['nap'],
+ self::NAURU => ['nau', 'na'],
+ self::NAVAJO => ['nav', 'nv'],
+ self::NDEBELE_SOUTH => ['nbl', 'nr'],
+ self::NDEBELE_NORTH => ['nde', 'nd'],
+ self::NDONGA => ['ndo', 'ng'],
+ self::LOW_GERMAN => ['nds'],
+ self::NEPALI => ['nep', 'ne'],
+ self::NEPAL_BHASA => ['new'],
+ self::NIAS => ['nia'],
+ self::NIGER_KORDOFANIAN => ['nic'],
+ self::NIUEAN => ['niu'],
+ self::NORWEGIAN_NYNORSK => ['nno', 'nn'],
+ self::BOKMAL => ['nob', 'nb'],
+ self::NOGAI => ['nog'],
+ self::NORSE_OLD => ['non'],
+ self::NORWEGIAN => ['nor', 'no'],
+ self::NKO => ['nqo'],
+ self::PEDI => ['nso'],
+ self::NUBIAN => ['nub'],
+ self::CLASSICAL_NEWARI => ['nwc'],
+ self::CHICHEWA => ['nya', 'ny'],
+ self::NYAMWEZI => ['nym'],
+ self::NYANKOLE => ['nyn'],
+ self::NYORO => ['nyo'],
+ self::NZIMA => ['nzi'],
+ self::OCCITAN => ['oci', 'oc'],
+ self::OJIBWA => ['oji', 'oj'],
+ self::ORIYA => ['ori', 'or'],
+ self::OROMO => ['orm', 'om'],
+ self::OSAGE => ['osa'],
+ self::OSSETIAN => ['oss', 'os'],
+ self::OTTOMAN => ['ota'],
+ self::OTOMIAN => ['oto'],
+ self::PAPUAN => ['paa'],
+ self::PANGASINAN => ['pag'],
+ self::PAHLAVI => ['pal'],
+ self::PAMPANGA => ['pam'],
+ self::PANJABI => ['pan', 'pa'],
+ self::PAPIAMENTO => ['pap'],
+ self::PALAUAN => ['pau'],
+ self::PERSIAN_OLD => ['peo'],
+ self::PHILIPPINE => ['phi'],
+ self::PHOENICIAN => ['phn'],
+ self::PALI => ['pli', 'pi'],
+ self::POLISH => ['pol', 'pl'],
+ self::POHNPEIAN => ['pon'],
+ self::PORTUGUESE => ['por', 'pt'],
+ self::PRAKRIT => ['pra'],
+ self::PROVENCAL => ['pro'],
+ self::PUSHTO => ['pus', 'ps'],
+ self::QUECHUA => ['que', 'qu'],
+ self::RAJASTHANI => ['raj'],
+ self::RAPANUI => ['rap'],
+ self::RAROTONGAN => ['rar'],
+ self::ROMANCE => ['roa'],
+ self::ROMANSH => ['roh', 'rm'],
+ self::ROMANY => ['rom'],
+ self::ROMANIAN => ['rum', 'ron', 'ro'],
+ self::RUNDI => ['run', 'rn'],
+ self::AROMANIAN => ['rup'],
+ self::RUSSIAN => ['rus', 'ru'],
+ self::SANDAWE => ['sad'],
+ self::SANGO => ['sag', 'sg'],
+ self::YAKUT => ['sah'],
+ self::AMERICAN_INDIAN_SOUTH => ['sai'],
+ self::SALISHAN => ['sal'],
+ self::SAMARITAN => ['sam'],
+ self::SANSKRIT => ['san', 'sa'],
+ self::SASAK => ['sas'],
+ self::SANTALI => ['sat'],
+ self::SICILIAN => ['scn'],
+ self::SCOTS => ['sco'],
+ self::SELKUP => ['sel'],
+ self::SEMITIC => ['sem'],
+ self::IRISH_OLD => ['sga'],
+ self::SIGN => ['sgn'],
+ self::SHAN => ['shn'],
+ self::SIDAMO => ['sid'],
+ self::SINHALA => ['sin', 'si'],
+ self::SIOUAN => ['sio'],
+ self::SINO_TIBETAN => ['sit'],
+ self::SLAVIC => ['sla'],
+ self::SLOVAK => ['slo', 'slk', 'sk'],
+ self::SLOVENIAN => ['slv', 'sl'],
+ self::SAMI_SOUTHERN => ['sma'],
+ self::SAMI_NORTHERN => ['sme', 'se'],
+ self::SAMI => ['smi'],
+ self::SAMI_LULE => ['smj'],
+ self::SAMI_IRARI => ['smn'],
+ self::SAMOAN => ['smo', 'sm'],
+ self::SAMI_SKOLT => ['sms'],
+ self::SHONA => ['sna', 'sn'],
+ self::SINDHI => ['snd', 'sd'],
+ self::SONINKE => ['snk'],
+ self::SOGDIAN => ['sog'],
+ self::SOMALI => ['som', 'so'],
+ self::SONGHAI => ['son'],
+ self::SOTHO_SOUTHERN => ['sot', 'st'],
+ self::SPANISH => ['spa', 'es'],
+ self::SARDINIAN => ['srd', 'sc'],
+ self::SRANAN_TONGO => ['sm'],
+ self::SERBIAN => ['srp', 'sr'],
+ self::SERER => ['srr'],
+ self::NILO_SAHARAN => ['ssa'],
+ self::SWATI => ['ssw', 'ss'],
+ self::SUKUMA => ['suk'],
+ self::SUNDANESE => ['sun', 'su'],
+ self::SUSU => ['sus'],
+ self::SUMERIAN => ['sux'],
+ self::SWAHILI => ['swa', 'sw'],
+ self::SWEDISH => ['swe', 'sv'],
+ self::SYRIAC_CLASSICAL => ['syc'],
+ self::SYRIAC => ['syr'],
+ self::TAHITIAN => ['tah', 'ty'],
+ self::TAI => ['tai'],
+ self::TAMIL => ['tam', 'ta'],
+ self::TATAR => ['tat', 'tt'],
+ self::TELUGU => ['tel', 'te'],
+ self::TIMNE => ['tem'],
+ self::TERENO => ['ter'],
+ self::TETUM => ['tet'],
+ self::TAJIK => ['tgk', 'tg'],
+ self::TAGALOG => ['tgl', 'tl'],
+ self::THAI => ['tha', 'th'],
+ self::TIGRE => ['tig'],
+ self::TIGRINYA => ['tir', 'ti'],
+ self::TIV => ['tiv'],
+ self::TOKELAU => ['tkl'],
+ self::KLINGON => ['tlh'],
+ self::TLINGIT => ['tli'],
+ self::TAMASHEK => ['tmh'],
+ self::TONGA_NYASA => ['tog'],
+ self::TONGA_ISLANDS => ['ton', 'to'],
+ self::TOK_PISIN => ['tpi'],
+ self::TSIMSHIAN => ['tsi'],
+ self::TSWANA => ['tsn', 'tn'],
+ self::TSONGA => ['tso', 'ts'],
+ self::TURKMEN => ['tuk', 'tk'],
+ self::TUMBUKA => ['tum'],
+ self::TUPI => ['tup'],
+ self::TURKISH => ['tur', 'tr'],
+ self::ALTAIC => ['tut'],
+ self::TUVALU => ['tvl'],
+ self::TWI => ['twi', 'tw'],
+ self::TUVINIAN => ['tyv'],
+ self::UDMURT => ['udm'],
+ self::UGARITIC => ['uga'],
+ self::UIGHUR => ['uig', 'ug'],
+ self::UKRAINIAN => ['ukr', 'uk'],
+ self::UMBUNDU => ['umb'],
+ self::UNDETERMINED => ['und'],
+ self::URDU => ['urd', 'ur'],
+ self::UZBEK => ['uzb', 'uz'],
+ self::VAI => ['vai'],
+ self::VENDA => ['ven', 've'],
+ self::VIETNAMESE => ['vie', 'vi'],
+ self::VOLAPUK => ['vol', 'vo'],
+ self::VOTIC => ['vot'],
+ self::WAKASHAN => ['wak'],
+ self::WOLAITTA => ['wal'],
+ self::WARAY => ['war'],
+ self::WASHO => ['was'],
+ self::SORBIAN => ['wen'],
+ self::WALLOON => ['wln', 'wa'],
+ self::WOLOF => ['wol', 'wo'],
+ self::KALMYK => ['xal'],
+ self::XHOSA => ['xho', 'xh'],
+ self::YAO => ['yao'],
+ self::YAPESE => ['yap'],
+ self::YIDDISH => ['yid', 'yi'],
+ self::YORUBA => ['yor', 'yo'],
+ self::YUPIK => ['ypk'],
+ self::ZAPOTEC => ['zap'],
+ self::BLISSYMBOLS => ['zbl'],
+ self::ZENAGA => ['zen'],
+ self::MOROCCAN_TAMAZIGHT => ['zgh'],
+ self::ZHUANG => ['zha', 'za'],
+ self::ZANDE => ['znd'],
+ self::ZULU => ['zul', 'zu'],
+ self::ZUNI => ['zun'],
+ self::NOT_APPLICABLE => ['zxx'],
+ self::ZAZA => ['zza'],
+ ];
+
+ private static $s_names = [
+ self::ENGLISH_US => ['US English'],
+ self::ENGLISH => ['English'],
+ self::ENGLISH_CA => ['Canadian English'],
+ self::ENGLISH_GB => ['British English'],
+ self::AFAR => ['Afar'],
+ self::ABKHAZIAN => ['Abkhazian'],
+ self::ACHINESE => ['Achinese'],
+ self::ACOLI => ['Acoli'],
+ self::ADANGME => ['Adangme'],
+ self::ADYGHE => ['Adyghe'],
+ self::AFRO_ASIATIC => ['Afro-Asiatic', 'Adygei'],
+ self::AFRIHILI => ['Afrihili'],
+ self::AFRIKAANS => ['Afrikaans'],
+ self::AINU => ['Ainu'],
+ self::AKAN => ['Akan'],
+ self::AKKADIAN => ['Akkadian'],
+ self::ALBANIAN => ['Albanian'],
+ self::ALEUT => ['Aleut'],
+ self::ALGONQUIAN => ['Algonquian'],
+ self::SOUTHERN_ALTAI => ['Southern Altai'],
+ self::AMHARIC => ['Amharic'],
+ self::ENGLISH_OLD => ['Old English'],
+ self::ANGIKA => ['Angika'],
+ self::APACHE => ['Apache'],
+ self::ARABIC => ['Arabic'],
+ self::ARAMAIC => ['Official Aramaic', 'Imperial Aramaic'],
+ self::ARAGONESE => ['Aragonese'],
+ self::ARMENIAN => ['Armenian'],
+ self::MAPUDUNGUN => ['Mapudungun', 'Mapuche'],
+ self::ARAPAHO => ['Arapaho'],
+ self::ARTIFICIAL => ['Artificial'],
+ self::ARAWAK => ['Arawak'],
+ self::ASSAMESE => ['Assamese'],
+ self::ASTURIAN => ['Asturian', 'Bable', 'Leonese', 'Asturleonese'],
+ self::ATHAPASCAN => ['Athapascan'],
+ self::AUSTRALIAN => ['Australian'],
+ self::AVARIC => ['Avaric'],
+ self::AVESTAN => ['Avestan'],
+ self::AWADHI => ['Awadhi'],
+ self::AYMARA => ['Aymara'],
+ self::AZERBAIJANI => ['Azerbaijani'],
+ self::BANDA => ['Banda'],
+ self::BAMILEKE => ['Bamileke'],
+ self::BASHKIR => ['Bashkir'],
+ self::BALUCHI => ['Baluchi'],
+ self::BAMBARA => ['Bambara'],
+ self::BALINESE => ['Balinese'],
+ self::BASQUE => ['Basque'],
+ self::BASA => ['Basa'],
+ self::BALTIC => ['Baltic'],
+ self::BEJA => ['Beja'],
+ self::BELARUSIAN => ['Belarusian'],
+ self::BEMBA => ['Bemba'],
+ self::BENGALI => ['Bengali'],
+ self::BERBER => ['Berber'],
+ self::BHOJPURI => ['Bhojpuri'],
+ self::BIHARI => ['Bihari'],
+ self::BIKOL => ['Bikol'],
+ self::BINI => ['Bini', 'Edo'],
+ self::BISLAMA => ['Bislama'],
+ self::SIKSIKA => ['Siksika'],
+ self::BANTU => ['Bantu'],
+ self::TIBETAN => ['Tibetan'],
+ self::BOSNIAN => ['Bosnian'],
+ self::BRAJ => ['Braj'],
+ self::BRETON => ['Breton'],
+ self::BATAK => ['Batak'],
+ self::BURIAT => ['Buriat'],
+ self::BUGINESE => ['Buginese'],
+ self::BULGARIAN => ['Bulgarian'],
+ self::BURMESE => ['Burmese'],
+ self::BLIN => ['Blin', 'Bilin'],
+ self::CADDO => ['Caddo'],
+ self::AMERICAN_INDIAN_CENTRAL => ['Central American Indian'],
+ self::GALIBI_CARIB => ['Galibi Carib'],
+ self::CATALAN => ['Catalan', 'Valencian'],
+ self::CAUCASIAN => ['Caucasian'],
+ self::CEBUANO => ['Cebuano'],
+ self::CELTIC => ['Celtic'],
+ self::CZECH => ['Czech'],
+ self::CHAMORRO => ['Chamorro'],
+ self::CHIBCHA => ['Chibcha'],
+ self::CHECHEN => ['Chechen'],
+ self::CHAGATAI => ['Chagatai'],
+ self::CHINESE => ['Chinese'],
+ self::CHUUKESE => ['Chuukese'],
+ self::MARI => ['Mari'],
+ self::CHINOOK_JARGON => ['Chinook jargon'],
+ self::CHOCTAW => ['Choctaw'],
+ self::CHIPEWYAN => ['Chipewyan', 'Dene Suline'],
+ self::CHEROKEE => ['Cherokee'],
+ self::CHURCH_SLAVIC => ['Church Slavic', 'Old Slavonic', 'Church Slavonic', 'Old Bulgarian', 'Old Church Slavonic'],
+ self::CHUVASH => ['Chuvash'],
+ self::CHEYENNE => ['Cheyenne'],
+ self::CHAMIC => ['Chamic'],
+ self::COPTIC => ['Coptic'],
+ self::CORNISH => ['Cornish'],
+ self::CORSICAN => ['Corsican'],
+ self::CREOLES_ENGLISH => ['Creoles and Pidgins, English Based'],
+ self::CREOLES_FRENCH => ['Creoles and Pidgins, French Based'],
+ self::CREOLES_PORTUGESE => ['Creoles and Pidgins, Portugese Based'],
+ self::CREE => ['Cree'],
+ self::CRIMEAN_TATAR => ['Crimean Tatar', 'Crimean Turkish'],
+ self::CREOLES => ['Creoles and Pidgins'],
+ self::KASHUBIAN => ['Kashubian'],
+ self::CUSHITIC => ['Cushitic'],
+ self::WELSH => ['Welsh'],
+ self::DAKOTA => ['Dakota'],
+ self::DANISH => ['Danish'],
+ self::DARGWA => ['Dargwa'],
+ self::LAND_DAYAK => ['Land Dayak'],
+ self::DELAWARE => ['Delaware'],
+ self::SLAVE => ['Athapascan Slave'],
+ self::GERMAN => ['German'],
+ self::DOGRIB => ['Dogrib'],
+ self::DINKA => ['Dinka'],
+ self::DIVEHI => ['Divehi', 'Dhivehi', 'Maldivian'],
+ self::DOGRI => ['Dogri'],
+ self::DRAVIDIAN => ['Dravidian'],
+ self::LOWER_SORBIAN => ['Lower Sorbian'],
+ self::DUALA => ['Duala'],
+ self::DUTCH_MIDDLE => ['Middle Dutch'],
+ self::DUTCH_FLEMISH => ['Dutch', 'Flemish'],
+ self::DYULA => ['Dyula'],
+ self::DZONGKHA => ['Dzongkha'],
+ self::EFIK => ['Efik'],
+ self::EGYPTIAN => ['Ancient Egyptian'],
+ self::EKAJUK => ['Ekajuk'],
+ self::GREEK_MODERN => ['Modern Greek'],
+ self::ELAMITE => ['Elamite'],
+ self::ENGLISH_MIDDLE => ['Middle English'],
+ self::ESPERANTO => ['Esperanto'],
+ self::ESTONIAN => ['Estonian'],
+ self::EWE => ['Ewe'],
+ self::EWONDO => ['Ewondo'],
+ self::FANG => ['Fang'],
+ self::FAROESE => ['Faroese'],
+ self::PERSIAN => ['Persian'],
+ self::FANTI => ['Fanti'],
+ self::FIJIAN => ['Fijian'],
+ self::FILIPINO => ['Filipino', 'Pilipino'],
+ self::FINNISH => ['Finnish'],
+ self::FINNO_UGRIAN => ['Finno-Ugrian '],
+ self::FON => ['Fon'],
+ self::FRENCH => ['French'],
+ self::FRENCH_MIDDLE => ['Middle French'],
+ self::FRENCH_OLD => ['Old French'],
+ self::FRISIAN_NORTHERN => ['Northern Frisian'],
+ self::FRISIAN_EASTERN => ['Eastern Frisian'],
+ self::FRISIAN_WESTERN => ['Southern Frisian'],
+ self::FULAH => ['Fulah'],
+ self::FRIULIAN => ['Friulian'],
+ self::GA => ['Ga'],
+ self::GAYO => ['Gayo'],
+ self::GBAYA => ['Gbaya'],
+ self::GERMANIC => ['Germanic'],
+ self::GEORGIAN => ['Georgian'],
+ self::GEEZ => ['Geez'],
+ self::GILBERTESE => ['Gilbertese'],
+ self::GAELIC => ['Gaelic', 'Scottish Gaelic'],
+ self::IRISH => ['Irish'],
+ self::GALICIAN => ['Galician'],
+ self::MANX => ['Manx'],
+ self::GERMAN_MIDDLE_HIGH => ['Middle High German'],
+ self::GERMAN_OLD_HIGH => ['Old High German'],
+ self::GONDI => ['Gondi'],
+ self::GORONTALO => ['Gorontalo'],
+ self::GOTHIC => ['Gothic'],
+ self::GREBO => ['Grebo'],
+ self::GREEK_ANCIENT => ['Ancient Greek'],
+ self::GUARANI => ['Guarani'],
+ self::GERMAN_SWISS => ['Swiss German', 'Alemannic', 'Alsatian'],
+ self::GUJARATI => ['Gujarati'],
+ self::GWICHIN => ['Gwich\'in'],
+ self::HAIDA => ['Haida'],
+ self::HAITIAN => ['Haitian', 'Haitian Creole'],
+ self::HAUSA => ['Hausa'],
+ self::HAWAIIAN => ['Hawaiian'],
+ self::HEBREW => ['Hebrew'],
+ self::HERERO => ['Herero'],
+ self::HILIGAYNON => ['Hiligaynon'],
+ self::HIMACHALI => ['Himachali', 'Western Pahari'],
+ self::HINDI => ['Hindi'],
+ self::HITTITE => ['Hittite'],
+ self::HMONG => ['Hmong', 'Mong'],
+ self::HIRI_MOTU => ['Hiri Motu'],
+ self::CROATIAN => ['Croatian'],
+ self::SORBIAN_UPPER => ['Upper Sorbian'],
+ self::HUNGARIAN => ['Hungarian'],
+ self::HUPA => ['Hupa'],
+ self::IBAN => ['Iban'],
+ self::IGBO => ['Igbo'],
+ self::ICELANDIC => ['Icelandic'],
+ self::IDO => ['Ido'],
+ self::SICHUAN_YI => ['Sichuan Yi', 'Nuosu'],
+ self::IJO => ['Ijo'],
+ self::INUKTITUT => ['Inuktitut'],
+ self::INTERLINGUE => ['Interlingue'],
+ self::ILOKO => ['Iloko'],
+ self::INTERLINGUA => ['Interlingua'],
+ self::INDIC => ['Indic'],
+ self::INDONESIAN => ['Indonesian'],
+ self::INDO_EUROPEAN => ['Indo-European'],
+ self::INGUSH => ['Ingush'],
+ self::INUPIAQ => ['Inupiaq'],
+ self::IRANIAN => ['Iranian'],
+ self::IROQUOIAN => ['Iroquoian'],
+ self::ITALIAN => ['Italian'],
+ self::JAVANESE => ['Javanese'],
+ self::LOJBAN => ['Lojban'],
+ self::JAPANESE => ['Japanese'],
+ self::JUDEO_PERSIAN => ['Judeo-Persian'],
+ self::JUDEO_ARABIC => ['Judeo-Arabic'],
+ self::KARA_KALPAK => ['Kara-Kalpak'],
+ self::KABYLE => ['Kabyle'],
+ self::KACHIN => ['Kachin', 'Jingpho'],
+ self::KALAALLISUT => ['Kalaallisut', 'Greenlandic'],
+ self::KAMBA => ['Kamba'],
+ self::KANNADA => ['Kannada'],
+ self::KAREN => ['Karen'],
+ self::KASHMIRI => ['Kashmiri'],
+ self::KANURI => ['Kanuri'],
+ self::KAWI => ['Kawi'],
+ self::KAZAKH => ['Kazakh'],
+ self::KABARDIAN => ['Kabardian'],
+ self::KHASI => ['Khasi'],
+ self::KHOISAN => ['Khoisan'],
+ self::CENTRAL_KHMER => ['Central Khmer'],
+ self::KHOTANESE => ['Khotanese', 'Sakan'],
+ self::KIKUYU => ['Kikuyu', 'Gikuyu'],
+ self::KINYARWANDA => ['Kinyarwanda'],
+ self::KIRGHIZ => ['Kirghiz', 'Kyrgyz'],
+ self::KIMBUNDU => ['Kimbundu'],
+ self::KONKANI => ['Konkani'],
+ self::KOMI => ['Komi'],
+ self::KONGO => ['Kongo'],
+ self::KOREAN => ['Korean'],
+ self::KOSRAEAN => ['Kosraean'],
+ self::KPELLE => ['Kpelle'],
+ self::KARACHAY_BALKAR => ['Karachay-Balkar'],
+ self::KARELIAN => ['Karelian'],
+ self::KRU => ['Kru'],
+ self::KURUKH => ['Kurukh'],
+ self::KUANYAMA => ['Kuanyama', 'Kwanyama'],
+ self::KUMYK => ['Kumyk'],
+ self::KURDISH => ['Kurdish'],
+ self::KUTENAI => ['Kutenai'],
+ self::LADINO => ['Ladino'],
+ self::LAHNDA => ['Lahnda'],
+ self::LAMBA => ['Lamba'],
+ self::LAO => ['Lao'],
+ self::LATIN => ['Latin'],
+ self::LATVIAN => ['Latvian'],
+ self::LEZGHIAN => ['Lezghian'],
+ self::LIMBURGAN => ['Limburgan', 'Limburger', 'Limburgish'],
+ self::LINGALA => ['Lingala'],
+ self::LITHUANIAN => ['Lithuanian'],
+ self::MONGO => ['Mongo'],
+ self::LOZI => ['Lozi'],
+ self::LUXEMBOURGISH => ['Luxembourgish', 'Letzeburgesch'],
+ self::LUBA_LULUA => ['Luba-Lulua'],
+ self::LUBA_KATANGA => ['Luba-Katanga'],
+ self::GANDA => ['Ganda'],
+ self::LUISENO => ['Luiseno'],
+ self::LUNDA => ['Lunda'],
+ self::LUO => ['Luo'],
+ self::LUSHAI => ['Lushai'],
+ self::MACEDONIAN => ['Macedonian'],
+ self::MADURESE => ['Madurese'],
+ self::MAGAHI => ['Magahi'],
+ self::MARSHALLESE => ['Marshallese'],
+ self::MAITHILI => ['Maithili'],
+ self::MAKASAR => ['Makasar'],
+ self::MALAYALAM => ['Malayalam'],
+ self::MANDINGO => ['Mandingo'],
+ self::MAORI => ['Maori'],
+ self::AUSTRONESIAN => ['Austronesian'],
+ self::MARATHI => ['Marathi'],
+ self::MASAI => ['Masai'],
+ self::MALAY => ['Malay'],
+ self::MOKSHA => ['Moksha'],
+ self::MANDAR => ['Mandar'],
+ self::MENDE => ['Mende'],
+ self::IRISH_MIDDLE => ['Middle Irish'],
+ self::MIKMAQ => ['Mi\'kmaq', 'Micmac'],
+ self::MINANGKABAU => ['Minangkabau'],
+ self::UNCODED => ['Uncoded'],
+ self::MON_KHMER => ['Mon-Khmer'],
+ self::MALAGASY => ['Malagasy'],
+ self::MALTESE => ['Maltese'],
+ self::MANCHU => ['Manchu'],
+ self::MANIPURI => ['Manipuri'],
+ self::MANOBO => ['Manobo'],
+ self::MOHAWK => ['Mohawk'],
+ self::MONGOLIAN => ['Mongolian'],
+ self::MOSSI => ['Mossi'],
+ self::MULTIPLE => ['Multiple'],
+ self::MUNDA => ['Munda'],
+ self::CREEK => ['Creek'],
+ self::MIRANDESE => ['Mirandese'],
+ self::MARWARI => ['Marwari'],
+ self::MAYAN => ['Mayan'],
+ self::ERZYA => ['Erzya'],
+ self::NAHUATL => ['Nahuatl'],
+ self::AMERICAN_INDIAN_NORTH => ['North American Indian'],
+ self::NEAPOLITAN => ['Neapolitan'],
+ self::NAURU => ['Nauru'],
+ self::NAVAJO => ['Navajo', 'Navaho'],
+ self::NDEBELE_SOUTH => ['South Ndebele'],
+ self::NDEBELE_NORTH => ['North Ndebele'],
+ self::NDONGA => ['Ndonga'],
+ self::LOW_GERMAN => ['Low German', 'Low Saxon'],
+ self::NEPALI => ['Nepali'],
+ self::NEPAL_BHASA => ['Nepal Bhasa', 'Newari'],
+ self::NIAS => ['Nias'],
+ self::NIGER_KORDOFANIAN => ['Niger-Kordofanian'],
+ self::NIUEAN => ['Niuean'],
+ self::NORWEGIAN_NYNORSK => ['Norwegian Nynorsk'],
+ self::BOKMAL => ['Bokmål', 'Norwegian Bokmål'],
+ self::NOGAI => ['Nogai'],
+ self::NORSE_OLD => ['Old Norse'],
+ self::NORWEGIAN => ['Norwegian'],
+ self::NKO => ['N\'Ko'],
+ self::PEDI => ['Pedi', 'Sepedi', 'Northern Sotho'],
+ self::NUBIAN => ['Nubian'],
+ self::CLASSICAL_NEWARI => ['Classical Newari', 'Old Newari', 'Classical Nepal Bhasa'],
+ self::CHICHEWA => ['Chichewa', 'Chewa', 'Nyanja'],
+ self::NYAMWEZI => ['Nyamwezi'],
+ self::NYANKOLE => ['Nyankole'],
+ self::NYORO => ['Nyoro'],
+ self::NZIMA => ['Nzima'],
+ self::OCCITAN => ['Occitan'],
+ self::OJIBWA => ['Ojibwa'],
+ self::ORIYA => ['Oriya'],
+ self::OROMO => ['Oromo'],
+ self::OSAGE => ['Osage'],
+ self::OSSETIAN => ['Ossetian', 'Ossetic'],
+ self::OTTOMAN => ['Ottoman Turkish'],
+ self::OTOMIAN => ['Otomian'],
+ self::PAPUAN => ['Papuan'],
+ self::PANGASINAN => ['Pangasinan'],
+ self::PAHLAVI => ['Pahlavi'],
+ self::PAMPANGA => ['Pampanga', 'Kapampangan'],
+ self::PANJABI => ['Panjabi', 'Punjabi'],
+ self::PAPIAMENTO => ['Papiamento'],
+ self::PALAUAN => ['Palauan'],
+ self::PERSIAN_OLD => ['Old Persian'],
+ self::PHILIPPINE => ['Philippine'],
+ self::PHOENICIAN => ['Phoenician'],
+ self::PALI => ['Pali'],
+ self::POLISH => ['Polish'],
+ self::POHNPEIAN => ['Pohnpeian'],
+ self::PORTUGUESE => ['Portuguese'],
+ self::PRAKRIT => ['Prakrit'],
+ self::PROVENCAL => ['Old Provençal', 'Old Occitan'],
+ self::PUSHTO => ['Pushto', 'Pashto'],
+ self::QUECHUA => ['Quechua'],
+ self::RAJASTHANI => ['Rajasthani'],
+ self::RAPANUI => ['Rapanui'],
+ self::RAROTONGAN => ['Rarotongan', 'Cook Islands Maori'],
+ self::ROMANCE => ['Romance'],
+ self::ROMANSH => ['Romansh'],
+ self::ROMANY => ['Romany'],
+ self::ROMANIAN => ['Romanian', 'Moldavian', 'Moldovan'],
+ self::RUNDI => ['Rundi'],
+ self::AROMANIAN => ['Aromanian', 'Arumanian', 'Macedo-Romanian'],
+ self::RUSSIAN => ['Russian'],
+ self::SANDAWE => ['Sandawe'],
+ self::SANGO => ['Sango'],
+ self::YAKUT => ['Yakut'],
+ self::AMERICAN_INDIAN_SOUTH => ['South American Indian'],
+ self::SALISHAN => ['Salishan'],
+ self::SAMARITAN => ['Samaritan'],
+ self::SANSKRIT => ['Sanskrit'],
+ self::SASAK => ['Sasak'],
+ self::SANTALI => ['Santali'],
+ self::SICILIAN => ['Sicilian'],
+ self::SCOTS => ['Scots'],
+ self::SELKUP => ['Selkup'],
+ self::SEMITIC => ['Semitic'],
+ self::IRISH_OLD => ['Old Irish'],
+ self::SIGN => ['Sign Language'],
+ self::SHAN => ['Shan'],
+ self::SIDAMO => ['Sidamo'],
+ self::SINHALA => ['Sinhala', 'Sinhalese'],
+ self::SIOUAN => ['Siouan'],
+ self::SINO_TIBETAN => ['Sino-Tibetan'],
+ self::SLAVIC => ['Slavic'],
+ self::SLOVAK => ['Slovak'],
+ self::SLOVENIAN => ['Slovenian'],
+ self::SAMI_SOUTHERN => ['Southern Sami'],
+ self::SAMI_NORTHERN => ['Northern Sami'],
+ self::SAMI => ['Sami'],
+ self::SAMI_LULE => ['Lule Sami'],
+ self::SAMI_IRARI => ['Inari Sami'],
+ self::SAMOAN => ['Samoan'],
+ self::SAMI_SKOLT => ['Skolt Sami'],
+ self::SHONA => ['Shona'],
+ self::SINDHI => ['Sindhi'],
+ self::SONINKE => ['Soninke'],
+ self::SOGDIAN => ['Sogdian'],
+ self::SOMALI => ['Somali'],
+ self::SONGHAI => ['Songhai'],
+ self::SOTHO_SOUTHERN => ['Southern Sotho'],
+ self::SPANISH => ['Spanish', 'Castilian'],
+ self::SARDINIAN => ['Sardinian'],
+ self::SRANAN_TONGO => ['Sranan Tongo'],
+ self::SERBIAN => ['Serbian'],
+ self::SERER => ['Serer'],
+ self::NILO_SAHARAN => ['Nilo-Saharan'],
+ self::SWATI => ['Swati'],
+ self::SUKUMA => ['Sukuma'],
+ self::SUNDANESE => ['Sundanese'],
+ self::SUSU => ['Susu'],
+ self::SUMERIAN => ['Sumerian'],
+ self::SWAHILI => ['Swahili'],
+ self::SWEDISH => ['Swedish'],
+ self::SYRIAC_CLASSICAL => ['Classical Syriac'],
+ self::SYRIAC => ['Syriac'],
+ self::TAHITIAN => ['Tahitian'],
+ self::TAI => ['Tai'],
+ self::TAMIL => ['Tamil'],
+ self::TATAR => ['Tatar'],
+ self::TELUGU => ['Telugu'],
+ self::TIMNE => ['Timne'],
+ self::TERENO => ['Tereno'],
+ self::TETUM => ['Tetum'],
+ self::TAJIK => ['Tajik'],
+ self::TAGALOG => ['Tagalog'],
+ self::THAI => ['Thai'],
+ self::TIGRE => ['Tigre'],
+ self::TIGRINYA => ['Tigrinya'],
+ self::TIV => ['Tiv'],
+ self::TOKELAU => ['Tokelau'],
+ self::KLINGON => ['Klingon', 'tlhIngan-Hol'],
+ self::TLINGIT => ['Tlingit'],
+ self::TAMASHEK => ['Tamashek'],
+ self::TONGA_NYASA => ['Nyasa Tonga'],
+ self::TONGA_ISLANDS => ['Tonga Islands Tonga', 'to'],
+ self::TOK_PISIN => ['Tok Pisin'],
+ self::TSIMSHIAN => ['Tsimshian'],
+ self::TSWANA => ['Tswana'],
+ self::TSONGA => ['Tsonga'],
+ self::TURKMEN => ['Turkmen'],
+ self::TUMBUKA => ['Tumbuka'],
+ self::TUPI => ['Tupi'],
+ self::TURKISH => ['Turkish'],
+ self::ALTAIC => ['Altaic'],
+ self::TUVALU => ['Tuvalu'],
+ self::TWI => ['Twi'],
+ self::TUVINIAN => ['Tuvinian'],
+ self::UDMURT => ['Udmurt'],
+ self::UGARITIC => ['Ugaritic'],
+ self::UIGHUR => ['Uighur', 'Uyghur'],
+ self::UKRAINIAN => ['Ukrainian'],
+ self::UMBUNDU => ['Umbundu'],
+ self::UNDETERMINED => ['Undetermined'],
+ self::URDU => ['Urdu'],
+ self::UZBEK => ['Uzbek'],
+ self::VAI => ['Vai'],
+ self::VENDA => ['Venda'],
+ self::VIETNAMESE => ['Vietnamese'],
+ self::VOLAPUK => ['Volapük'],
+ self::VOTIC => ['Votic'],
+ self::WAKASHAN => ['Wakashan'],
+ self::WOLAITTA => ['Wolaitta', 'Wolaytta'],
+ self::WARAY => ['Waray'],
+ self::WASHO => ['Washo'],
+ self::SORBIAN => ['Sorbian'],
+ self::WALLOON => ['Walloon'],
+ self::WOLOF => ['Wolof'],
+ self::KALMYK => ['Kalmyk', 'Oirat'],
+ self::XHOSA => ['Xhosa'],
+ self::YAO => ['Yao'],
+ self::YAPESE => ['Yapese'],
+ self::YIDDISH => ['Yiddish'],
+ self::YORUBA => ['Yoruba'],
+ self::YUPIK => ['Yupik'],
+ self::ZAPOTEC => ['Zapotec'],
+ self::BLISSYMBOLS => ['Blissymbols', 'Blissymbolics', 'Bliss'],
+ self::ZENAGA => ['Zenaga'],
+ self::MOROCCAN_TAMAZIGHT => ['Standard Moroccan Tamazight'],
+ self::ZHUANG => ['Zhuang', 'Chuang'],
+ self::ZANDE => ['Zande'],
+ self::ZULU => ['Zulu'],
+ self::ZUNI => ['Zuni'],
+ self::NOT_APPLICABLE => ['No Linguistic Content', 'Not Applicable'],
+ self::ZAZA => ['Zaza', 'Dimili', 'Dimli', 'Kirdki', 'Kirmanjki', 'Zazaki'],
+ ];
+
+ private static $s_ids = [
'en-us' => self::ENGLISH_US,
'en' => self::ENGLISH,
'eng' => self::ENGLISH,
'zun' => self::ZUNI,
'zxx' => self::NOT_APPLICABLE,
'zza' => self::ZAZA,
- );
+ ];
- private static $s_rtl_ids = array(
+ private static $s_rtl_ids = [
// @todo: populate this with $id => $id.
- );
+ ];
/**
*/
public static function s_get_names_by_id($id) {
if (!is_int($id) && !is_numeric($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($id, self::$s_names)) {
*/
public static function s_get_names_by_alias($alias) {
if (!is_string($alias)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($alias, self::$s_ids) && array_key_exists(self::$s_ids[$alias], self::$s_names)) {
*/
public static function s_get_id_by_name($name) {
if (!is_string($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_get_id_by_alias($alias) {
if (!is_string($alias)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_get_aliases_by_id($id) {
if (!is_int($id) && !is_numeric($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($id, self::$s_aliases)) {
*/
public static function s_get_aliases_by_name($name) {
if (!is_string($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
if (array_key_exists($name, self::$s_aliases)) {
* Implementation of s_get_ids().
*/
public static function s_get_ids() {
- $ids = array();
+ $ids = [];
foreach (self::$s_aliases as $key => $value) {
$ids[$key] = $key;
}
*/
public function set_name($name) {
if (!is_string($name) || empty($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$parsed = parse_url($name, PHP_URL_HOST);
if ($parsed === FALSE) {
unset($parsed);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'parse_url', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'parse_url', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function set_bind_name($name) {
if (!is_null($name) && (!is_string($name) || empty($name))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_bind_password($password) {
if (!is_null($password) && (!is_string($password) || empty($password))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function do_connect() {
if (is_null($this->name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->ldap)) {
$this->ldap = NULL;
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_connect', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_connect', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
}
unset($bound);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::FUNCTION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::FUNCTION_FAILURE);
return c_base_return_error::s_false($error);
}
}
unset($unbound);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_unbind', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_unbind', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_search($directory_name, $filter, $attributes, $attributes_only = FALSE, $entry_limit = 0, $time_limit = 0, $dereference = LDAP_DEREF_NEVER) {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_string($directory_name) || !is_string($filter)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($attributes)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($entry_limit) || $entry_limit < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'entry_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'entry_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($time_limit) || $time_limit < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'time_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'time_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($dereference)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'dereference', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'dereference', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
unset($found);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_search', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_search', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_list($directory_name, $filter, $attributes, $attributes_only = FALSE, $entry_limit = 0, $time_limit = 0, $dereference = LDAP_DEREF_NEVER) {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_string($directory_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($filter)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'filter', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'filter', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($attributes)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($entry_limit) || $entry_limit < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'entry_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'entry_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($time_limit) || $time_limit < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'time_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'time_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($dereference)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'dereference', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'dereference', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
unset($found);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_list', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_list', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_read($directory_name, $filter, $attributes, $attributes_only = FALSE, $entry_limit = 0, $time_limit = 0, $dereference = LDAP_DEREF_NEVER) {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_string($directory_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($filter)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'filter', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'filter', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($attributes)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($entry_limit) || $entry_limit < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'entry_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'entry_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($time_limit) || $time_limit < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'time_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'time_limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($dereference)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'dereference', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'dereference', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
unset($found);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_read', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_read', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_compare($directory_name, $attribute, $value) {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_string($directory_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directory_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attibute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attibute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($result === -1) {
unset($result);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_compare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_compare', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function get_error_message() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
*/
public function get_error_number() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
*/
public function get_option($option) {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_int($option)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$value = NULL;
if (ldap_get_option($this->ldap, $option, $value) === FALSE) {
unset($value);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_get_option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_get_option', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function set_ldap($ldap) {
if (!is_resource($ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_count() {
if (!is_resource($ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
$total = ldap_count_entries($this->ldap, $this->value);
if ($total === FALSE) {
unset($total);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_count_entries', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_count_entries', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function load_entry_first() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
$first = ldap_first_entry($this->ldap, $this->value);
if ($first === FALSE) {
unset($first);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_first_entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_first_entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function load_entry_next() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
// the entry must first be loaded by self::load_entry_first().
if (!is_null($this->entry)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
*/
public function get_entry_all() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if ($entries === FALSE) {
unset($entries);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_get_entries', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_get_entries', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function get_attribute_first() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->entry)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if ($attribute === FALSE) {
unset($attribute);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_first_attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_first_attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function get_attribute_next() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->entry)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if ($attribute === FALSE) {
unset($attribute);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_next_attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_next_attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function get_attribute_all() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->entry)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if ($attributes === FALSE) {
unset($attributes);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_get_attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_get_attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function get_directory_name() {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->entry)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if ($directory_name === FALSE) {
unset($directory_name);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_get_dn', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_get_dn', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function get_values($attribute, $binary = FALSE) {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->entry)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->entry', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (!is_string($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($binary)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'binary', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'binary', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($values)) {
unset($values);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => ($binary ? 'ldap_get_values_len' : 'ldap_get_values'), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => ($binary ? 'ldap_get_values_len' : 'ldap_get_values'), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_sort($attribute) {
if (!is_resource($this->ldap)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NO_CONNECTION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{resource_name}' => 'this->ldap', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NO_CONNECTION);
return c_base_return_error::s_false($error);
}
if (!is_string($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($status === FALSE) {
unset($status);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_sort', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_sort', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
unset($status);
return new c_base_return_true();
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'ldap_free_result', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'ldap_free_result', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
}
*/
public function set_type($type) {
if (!is_int($type) || $type < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_type_sub($type_sub) {
if (!is_int($type_sub) || $type_sub < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type_sub', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type_sub', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_severity($severity) {
if (!is_int($severity) || $severity < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'severity', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'severity', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_facility($facility) {
if (!is_int($facility) || $facility < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'facility', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'facility', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
public function __construct() {
parent::__construct();
- $this->attributes = array();
- $this->tags = array();
+ $this->attributes = [];
+ $this->tags = [];
$this->tags_total = 0;
$this->text = NULL;
$this->type = static::TYPE_TEXT;
*/
public function set_attribute($attribute, $value) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
case c_base_markup_attributes::ATTRIBUTE_NONE:
// when attribute none is specified, the entire attributes array is to be reset.
unset($this->attributes);
- $this->attributes = array();
+ $this->attributes = [];
return new c_base_return_true();
case c_base_markup_attributes::ATTRIBUTE_ABBR:
if (!is_array($value)) {
if (is_string($value)) {
if (!isset($this->attributes[$attribute])) {
- $this->attributes[$attribute] = array();
+ $this->attributes[$attribute] = [];
}
$this->attributes[$attribute][] = $value;
*/
public function get_attributes() {
if (!isset($this->attributes) && !is_array($this->attributes)) {
- $this->attributes = array();
+ $this->attributes = [];
}
return c_base_return_array::s_new($this->attributes);
*/
public function get_attribute($attribute) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!isset($this->attributes) && !is_array($this->attributes)) {
- $this->attributes = array();
+ $this->attributes = [];
}
if (array_key_exists($attribute, $this->attributes)) {
switch ($attribute) {
case c_base_markup_attributes::ATTRIBUTE_NONE:
// should not be possible, so consider this an error (when attribute is set to NONE, the entire attributes array is unset).
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
case c_base_markup_attributes::ATTRIBUTE_ABBR:
*
* @see: self::pr_check_attribute_as_text()
*/
- public function check_attribute($attribute, $sanitize = FALSE, $type = NULL, $sub_type = NULL, $options = array()) {
+ public function check_attribute($attribute, $sanitize = FALSE, $type = NULL, $sub_type = NULL, $options = []) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($sanitize)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'sanitize', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'sanitize', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($sub_type) && !is_int($sub_type) && !is_string($sub_type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'sub_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'sub_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($options)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'options', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_tag($tag, $index = NULL) {
if (!($tag instanceof c_base_markup_tag)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'tag', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'tag', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($index) && (!is_int($index) && $index < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->tags)) {
- $this->tags = array();
+ $this->tags = [];
}
if (is_null($index)) {
*/
public function unset_tag($index) {
if (!is_null($index) && (!is_int($index) && $index < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->tags)) {
- $this->tags = array();
+ $this->tags = [];
}
if (is_null($index)) {
*/
public function get_tag($index) {
if (!is_int($index) && $index < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_tags() {
if (!is_array($this->tags)) {
- $this->tags = array();
+ $this->tags = [];
}
return c_base_return_array::s_new($this->tags);
*/
public function set_text($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_type($type) {
if (!is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$value = (string) $this->attributes[$attribute];
}
else {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'value attribute', ':{expected_format}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'value attribute', ':{expected_format}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
$this->attributes[$attribute] = NULL;
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'value attribute', ':{expected_format}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'value attribute', ':{expected_format}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
if ($sanitize) {
return c_base_return_error::s_true($error);
if ($invalid) {
unset($invalid);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'value attribute', ':{expected_format}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'value attribute', ':{expected_format}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
if ($changed) {
unset($changed);
return c_base_return_error::s_true($error);
*/
protected function pr_check_attribute_as_numeric($attribute, $sanitize = TRUE) {
if (!is_numeric($this->attributes[$attribute])) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'value attribute', ':{expected_format}' => 'number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'value attribute', ':{expected_format}' => 'number', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function do_build(&$http, &$database, &$session, $settings, $items = NULL) {
if (!($http instanceof c_base_http)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
elseif (!($database instanceof c_base_database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
elseif (!($session instanceof c_base_session)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
elseif (!is_array($settings)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
elseif (!is_null($items) && !is_array($items)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'items', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'items', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_text($text) {
if (!is_int($text) && !is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_uri($uri) {
if (!is_null($uri) && !is_string($uri) && !is_array($uri)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'uri', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_attribute($attribute, $value) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->attributes)) {
- $this->attributes = array();
+ $this->attributes = [];
}
$this->attributes[$attribute] = $value;
*/
public function set_attributes($attributes) {
if (!is_array($attributes)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attributes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_item($item, $index = NULL) {
if (!($item instanceof c_base_menu_item)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'item', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'item', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($index) && !is_int($index) && !is_string($index)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->items)) {
- $this->items = array();
+ $this->items = [];
}
if (is_null($index)) {
*/
public function set_items($items) {
if (!is_null($items) && !($items instanceof c_base_menu_item)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'items', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'items', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
public function get_attribute($attribute) {
if (!is_int($attribute)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'attribute', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_attributes() {
if (!is_array($this->attributes)) {
- return c_base_return_array::s_new(array());
+ return c_base_return_array::s_new([]);
}
return c_base_return_array::s_new($this->attributes);
*/
public function get_item($index) {
if (!is_string($index) || empty($index)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'index', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_items() {
if (!is_null($this->items) && !is_array($this->items)) {
- return c_base_return_array::s_new(array());
+ return c_base_return_array::s_new([]);
}
return c_base_return_array::s_new($this->items);
*/
public function get_items_keys() {
if (empty($this->items)) {
- return array();
+ return [];
}
return array_keys($this->items);
const TYPE_APPLICATION_OCSP_RESPONSE = 7002;
- private static $s_names_provided = array(
- self::TYPE_PROVIDED => array('*/*', 'text/*', 'image/*', 'audio/*', 'video/*', 'application/*'),
- self::TYPE_STREAM => array('application/octet-stream'),
- self::TYPE_DATA_FORM => array('multipart/form-data'),
- self::TYPE_DATA_URL => array('application/x-www-form-urlencoded'),
- );
-
- private static $s_names_text = array(
- self::TYPE_TEXT => array('text/*'),
- self::TYPE_TEXT_PLAIN => array('text/plain'),
- self::TYPE_TEXT_HTML => array('text/html'),
- self::TYPE_TEXT_RSS => array('application/rss', 'application/rss+xml', 'application/rdf+xml', 'application/atom+xml'),
- self::TYPE_TEXT_ICAL => array('text/calendar'),
- self::TYPE_TEXT_CSV => array('text/csv'),
- self::TYPE_TEXT_XML => array('application/xml'),
- self::TYPE_TEXT_CSS => array('text/css'),
- self::TYPE_TEXT_JS => array('text/javascript', 'application/javascript'),
- self::TYPE_TEXT_JSON => array('text/json', 'application/json'),
- self::TYPE_TEXT_RICH => array('text/rtf'),
- self::TYPE_TEXT_XHTML => array('application/xhtml', 'application/xhtml+xml'),
- self::TYPE_TEXT_PS => array('text/ps'),
- self::TYPE_TEXT_FSS => array('text/fss'),
- );
-
- private static $s_names_image = array(
- self::TYPE_IMAGE => array('image/*'),
- self::TYPE_IMAGE_PNG => array('image/png'),
- self::TYPE_IMAGE_GIF => array('image/gif'),
- self::TYPE_IMAGE_JPEG => array('image/jpeg', 'image/jpg', 'image/jpx'),
- self::TYPE_IMAGE_BMP => array('image/bmp'),
- self::TYPE_IMAGE_SVG => array('image/svg'),
- self::TYPE_IMAGE_TIFF => array('image/tiff', 'image/tiff-fx'),
- );
-
- private static $s_names_audio = array(
- self::TYPE_AUDIO => array('audio/*'),
- self::TYPE_AUDIO_WAV => array('audio/wav'),
- self::TYPE_AUDIO_OGG => array('audio/ogg'),
- self::TYPE_AUDIO_OPUS => array('audio/opus'),
- self::TYPE_AUDIO_SPEEX => array('audio/speex'),
- self::TYPE_AUDIO_FLAC => array('audio/flac'),
- self::TYPE_AUDIO_MP3 => array('audio/mpeg'),
- self::TYPE_AUDIO_MP4 => array('audio/mp4'),
- self::TYPE_AUDIO_MIDI => array('audio/midi'),
- self::TYPE_AUDIO_BASIC => array('audio/au', 'audio/snd'),
- );
-
- private static $s_names_video = array(
- self::TYPE_VIDEO => array('video/*'),
- self::TYPE_VIDEO_MPEG => array('video/mp4', 'video/mpeg'),
- self::TYPE_VIDEO_OGG => array('video/ogv'),
- self::TYPE_VIDEO_H264 => array('video/h264', 'video/x264'),
- self::TYPE_VIDEO_QUICKTIME => array('video/qt'),
- self::TYPE_VIDEO_DV => array('video/dv'),
- self::TYPE_VIDEO_JPEG => array('video/jpeg', 'video/jpeg2000'),
- self::TYPE_VIDEO_WEBM => array('video/webm'),
- );
-
- private static $s_names_document = array(
- self::TYPE_DOCUMENT => array('application/*'),
- self::TYPE_DOCUMENT_PDF => array('application/pdf'),
- self::TYPE_DOCUMENT_LIBRECHART => array('application/vnd.oasis.opendocument.chart'),
- self::TYPE_DOCUMENT_LIBREFORMULA => array('application/vnd.oasis.opendocument.formula'),
- self::TYPE_DOCUMENT_LIBREGRAPHIC => array('application/vnd.oasis.opendocument.graphics'),
- self::TYPE_DOCUMENT_LIBREPRESENTATION => array('application/vnd.oasis.opendocument.presentation'),
- self::TYPE_DOCUMENT_LIBRESPREADSHEET => array('application/vnd.oasis.opendocument.spreadsheet'),
- self::TYPE_DOCUMENT_LIBRETEXT => array('application/vnd.oasis.opendocument.text'),
- self::TYPE_DOCUMENT_LIBREHTML => array('application/vnd.oasis.opendocument.text-web'),
- self::TYPE_DOCUMENT_ABIWORD => array('application/abiword', 'application/abiword-compressed'),
- self::TYPE_DOCUMENT_MSWORD => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/msword'),
- self::TYPE_DOCUMENT_MSEXCEL => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/ms-excel'),
- self::TYPE_DOCUMENT_MSPOWERPOINT => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/ms-powerpoint'),
- );
-
- private static $s_names_container = array(
- self::TYPE_CONTAINER => array('application/*'),
- self::TYPE_CONTAINER_TAR => array('application/tar'),
- self::TYPE_CONTAINER_CPIO => array('application/cpio'),
- self::TYPE_CONTAINER_JAVA => array('application/java'),
- );
-
- private static $s_names_application = array(
- self::TYPE_APPLICATION => array('application/*'),
- self::TYPE_APPLICATION_OCSP_REQUEST => array('application/ocsp-request'),
- self::TYPE_APPLICATION_OCSP_RESPONSE => array('application/ocsp-response'),
- );
-
- private static $s_extensions_text = array(
- self::TYPE_TEXT => array(),
- self::TYPE_TEXT_PLAIN => array('txt'),
- self::TYPE_TEXT_HTML => array('html'),
- self::TYPE_TEXT_RSS => array('rss', 'rdf'),
- self::TYPE_TEXT_ICAL => array('ics'),
- self::TYPE_TEXT_CSV => array('csv'),
- self::TYPE_TEXT_XML => array('xml'),
- self::TYPE_TEXT_CSS => array('css'),
- self::TYPE_TEXT_JS => array('js'),
- self::TYPE_TEXT_JSON => array('json'),
- self::TYPE_TEXT_RICH => array('rtf'),
- self::TYPE_TEXT_XHTML => array('xhtml'),
- self::TYPE_TEXT_PS => array('ps'),
- self::TYPE_TEXT_FSS => array('setting'),
- );
-
- private static $s_extensions_image = array(
- self::TYPE_IMAGE => array(),
- self::TYPE_IMAGE_PNG => array('png'),
- self::TYPE_IMAGE_GIF => array('gif'),
- self::TYPE_IMAGE_JPEG => array('jpg', 'jpeg'),
- self::TYPE_IMAGE_BMP => array('bmp'),
- self::TYPE_IMAGE_SVG => array('svg'),
- self::TYPE_IMAGE_TIFF => array('tiff'),
- );
-
- private static $s_extensions_audio = array(
- self::TYPE_AUDIO => array(),
- self::TYPE_AUDIO_WAV => array('wav'),
- self::TYPE_AUDIO_OGG => array('ogg'),
- self::TYPE_AUDIO_OPUS => array('opus', 'ogg'),
- self::TYPE_AUDIO_SPEEX => array('spx'),
- self::TYPE_AUDIO_FLAC => array('flac'),
- self::TYPE_AUDIO_MP3 => array('mp3', 'mp2', 'mp1'),
- self::TYPE_AUDIO_MP4 => array('mp4', 'mpeg'),
- self::TYPE_AUDIO_MIDI => array('midi'),
- self::TYPE_AUDIO_BASIC => array('au', 'snd'),
- );
-
- private static $s_extensions_video = array(
- self::TYPE_VIDEO => array(),
- self::TYPE_VIDEO_MPEG => array('mp4', 'video/mpeg'),
- self::TYPE_VIDEO_OGG => array('video/ogv'),
- self::TYPE_VIDEO_H264 => array('video/h264'),
- self::TYPE_VIDEO_QUICKTIME => array('video/qt'),
- self::TYPE_VIDEO_DV => array('video/dv'),
- self::TYPE_VIDEO_JPEG => array('video/jpeg', 'video/jpeg2000'),
- self::TYPE_VIDEO_WEBM => array('video/webm'),
- );
-
- private static $s_extensions_document = array(
- self::TYPE_DOCUMENT => array('application/*'),
- self::TYPE_DOCUMENT_PDF => array('application/pdf'),
- self::TYPE_DOCUMENT_LIBRECHART => array('application/vnd.oasis.opendocument.chart'),
- self::TYPE_DOCUMENT_LIBREFORMULA => array('application/vnd.oasis.opendocument.formula'),
- self::TYPE_DOCUMENT_LIBREGRAPHIC => array('application/vnd.oasis.opendocument.graphics'),
- self::TYPE_DOCUMENT_LIBREPRESENTATION => array('application/vnd.oasis.opendocument.presentation'),
- self::TYPE_DOCUMENT_LIBRESPREADSHEET => array('application/vnd.oasis.opendocument.spreadsheet'),
- self::TYPE_DOCUMENT_LIBRETEXT => array('application/vnd.oasis.opendocument.text'),
- self::TYPE_DOCUMENT_LIBREHTML => array('application/vnd.oasis.opendocument.text-web'),
- self::TYPE_DOCUMENT_ABIWORD => array('application/abiword', 'application/abiword-compressed'),
- self::TYPE_DOCUMENT_MSWORD => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/msword'),
- self::TYPE_DOCUMENT_MSEXCEL => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/ms-excel'),
- self::TYPE_DOCUMENT_MSPOWERPOINT => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/ms-powerpoint'),
- );
-
- private static $s_extensions_container = array(
- self::TYPE_CONTAINER => array('application/*'),
- self::TYPE_CONTAINER_TAR => array('application/tar'),
- self::TYPE_CONTAINER_CPIO => array('application/cpio'),
- self::TYPE_CONTAINER_JAVA => array('application/java'),
- );
-
- private static $s_extensions_application = array(
- self::TYPE_APPLICATION => array('application/*'),
- self::TYPE_APPLICATION_OCSP_REQUEST => array('application/ocsp-request'),
- self::TYPE_APPLICATION_OCSP_RESPONSE => array('application/ocsp-response'),
- );
+ private static $s_names_provided = [
+ self::TYPE_PROVIDED => ['*/*', 'text/*', 'image/*', 'audio/*', 'video/*', 'application/*'],
+ self::TYPE_STREAM => ['application/octet-stream'],
+ self::TYPE_DATA_FORM => ['multipart/form-data'],
+ self::TYPE_DATA_URL => ['application/x-www-form-urlencoded'],
+ ];
+
+ private static $s_names_text = [
+ self::TYPE_TEXT => ['text/*'],
+ self::TYPE_TEXT_PLAIN => ['text/plain'],
+ self::TYPE_TEXT_HTML => ['text/html'],
+ self::TYPE_TEXT_RSS => ['application/rss', 'application/rss+xml', 'application/rdf+xml', 'application/atom+xml'],
+ self::TYPE_TEXT_ICAL => ['text/calendar'],
+ self::TYPE_TEXT_CSV => ['text/csv'],
+ self::TYPE_TEXT_XML => ['application/xml'],
+ self::TYPE_TEXT_CSS => ['text/css'],
+ self::TYPE_TEXT_JS => ['text/javascript', 'application/javascript'],
+ self::TYPE_TEXT_JSON => ['text/json', 'application/json'],
+ self::TYPE_TEXT_RICH => ['text/rtf'],
+ self::TYPE_TEXT_XHTML => ['application/xhtml', 'application/xhtml+xml'],
+ self::TYPE_TEXT_PS => ['text/ps'],
+ self::TYPE_TEXT_FSS => ['text/fss'],
+ ];
+
+ private static $s_names_image = [
+ self::TYPE_IMAGE => ['image/*'],
+ self::TYPE_IMAGE_PNG => ['image/png'],
+ self::TYPE_IMAGE_GIF => ['image/gif'],
+ self::TYPE_IMAGE_JPEG => ['image/jpeg', 'image/jpg', 'image/jpx'],
+ self::TYPE_IMAGE_BMP => ['image/bmp'],
+ self::TYPE_IMAGE_SVG => ['image/svg'],
+ self::TYPE_IMAGE_TIFF => ['image/tiff', 'image/tiff-fx'],
+ ];
+
+ private static $s_names_audio = [
+ self::TYPE_AUDIO => ['audio/*'],
+ self::TYPE_AUDIO_WAV => ['audio/wav'],
+ self::TYPE_AUDIO_OGG => ['audio/ogg'],
+ self::TYPE_AUDIO_OPUS => ['audio/opus'],
+ self::TYPE_AUDIO_SPEEX => ['audio/speex'],
+ self::TYPE_AUDIO_FLAC => ['audio/flac'],
+ self::TYPE_AUDIO_MP3 => ['audio/mpeg'],
+ self::TYPE_AUDIO_MP4 => ['audio/mp4'],
+ self::TYPE_AUDIO_MIDI => ['audio/midi'],
+ self::TYPE_AUDIO_BASIC => ['audio/au', 'audio/snd'],
+ ];
+
+ private static $s_names_video = [
+ self::TYPE_VIDEO => ['video/*'],
+ self::TYPE_VIDEO_MPEG => ['video/mp4', 'video/mpeg'],
+ self::TYPE_VIDEO_OGG => ['video/ogv'],
+ self::TYPE_VIDEO_H264 => ['video/h264', 'video/x264'],
+ self::TYPE_VIDEO_QUICKTIME => ['video/qt'],
+ self::TYPE_VIDEO_DV => ['video/dv'],
+ self::TYPE_VIDEO_JPEG => ['video/jpeg', 'video/jpeg2000'],
+ self::TYPE_VIDEO_WEBM => ['video/webm'],
+ ];
+
+ private static $s_names_document = [
+ self::TYPE_DOCUMENT => ['application/*'],
+ self::TYPE_DOCUMENT_PDF => ['application/pdf'],
+ self::TYPE_DOCUMENT_LIBRECHART => ['application/vnd.oasis.opendocument.chart'],
+ self::TYPE_DOCUMENT_LIBREFORMULA => ['application/vnd.oasis.opendocument.formula'],
+ self::TYPE_DOCUMENT_LIBREGRAPHIC => ['application/vnd.oasis.opendocument.graphics'],
+ self::TYPE_DOCUMENT_LIBREPRESENTATION => ['application/vnd.oasis.opendocument.presentation'],
+ self::TYPE_DOCUMENT_LIBRESPREADSHEET => ['application/vnd.oasis.opendocument.spreadsheet'],
+ self::TYPE_DOCUMENT_LIBRETEXT => ['application/vnd.oasis.opendocument.text'],
+ self::TYPE_DOCUMENT_LIBREHTML => ['application/vnd.oasis.opendocument.text-web'],
+ self::TYPE_DOCUMENT_ABIWORD => ['application/abiword', 'application/abiword-compressed'],
+ self::TYPE_DOCUMENT_MSWORD => ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/msword'],
+ self::TYPE_DOCUMENT_MSEXCEL => ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/ms-excel'],
+ self::TYPE_DOCUMENT_MSPOWERPOINT => ['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/ms-powerpoint'],
+ ];
+
+ private static $s_names_container = [
+ self::TYPE_CONTAINER => ['application/*'],
+ self::TYPE_CONTAINER_TAR => ['application/tar'],
+ self::TYPE_CONTAINER_CPIO => ['application/cpio'],
+ self::TYPE_CONTAINER_JAVA => ['application/java'],
+ ];
+
+ private static $s_names_application = [
+ self::TYPE_APPLICATION => ['application/*'],
+ self::TYPE_APPLICATION_OCSP_REQUEST => ['application/ocsp-request'],
+ self::TYPE_APPLICATION_OCSP_RESPONSE => ['application/ocsp-response'],
+ ];
+
+ private static $s_extensions_text = [
+ self::TYPE_TEXT => [],
+ self::TYPE_TEXT_PLAIN => ['txt'],
+ self::TYPE_TEXT_HTML => ['html'],
+ self::TYPE_TEXT_RSS => ['rss', 'rdf'],
+ self::TYPE_TEXT_ICAL => ['ics'],
+ self::TYPE_TEXT_CSV => ['csv'],
+ self::TYPE_TEXT_XML => ['xml'],
+ self::TYPE_TEXT_CSS => ['css'],
+ self::TYPE_TEXT_JS => ['js'],
+ self::TYPE_TEXT_JSON => ['json'],
+ self::TYPE_TEXT_RICH => ['rtf'],
+ self::TYPE_TEXT_XHTML => ['xhtml'],
+ self::TYPE_TEXT_PS => ['ps'],
+ self::TYPE_TEXT_FSS => ['setting'],
+ ];
+
+ private static $s_extensions_image = [
+ self::TYPE_IMAGE => [],
+ self::TYPE_IMAGE_PNG => ['png'],
+ self::TYPE_IMAGE_GIF => ['gif'],
+ self::TYPE_IMAGE_JPEG => ['jpg', 'jpeg'],
+ self::TYPE_IMAGE_BMP => ['bmp'],
+ self::TYPE_IMAGE_SVG => ['svg'],
+ self::TYPE_IMAGE_TIFF => ['tiff'],
+ ];
+
+ private static $s_extensions_audio = [
+ self::TYPE_AUDIO => [],
+ self::TYPE_AUDIO_WAV => ['wav'],
+ self::TYPE_AUDIO_OGG => ['ogg'],
+ self::TYPE_AUDIO_OPUS => ['opus', 'ogg'],
+ self::TYPE_AUDIO_SPEEX => ['spx'],
+ self::TYPE_AUDIO_FLAC => ['flac'],
+ self::TYPE_AUDIO_MP3 => ['mp3', 'mp2', 'mp1'],
+ self::TYPE_AUDIO_MP4 => ['mp4', 'mpeg'],
+ self::TYPE_AUDIO_MIDI => ['midi'],
+ self::TYPE_AUDIO_BASIC => ['au', 'snd'],
+ ];
+
+ private static $s_extensions_video = [
+ self::TYPE_VIDEO => [],
+ self::TYPE_VIDEO_MPEG => ['mp4', 'video/mpeg'],
+ self::TYPE_VIDEO_OGG => ['video/ogv'],
+ self::TYPE_VIDEO_H264 => ['video/h264'],
+ self::TYPE_VIDEO_QUICKTIME => ['video/qt'],
+ self::TYPE_VIDEO_DV => ['video/dv'],
+ self::TYPE_VIDEO_JPEG => ['video/jpeg', 'video/jpeg2000'],
+ self::TYPE_VIDEO_WEBM => ['video/webm'],
+ ];
+
+ private static $s_extensions_document = [
+ self::TYPE_DOCUMENT => ['application/*'],
+ self::TYPE_DOCUMENT_PDF => ['application/pdf'],
+ self::TYPE_DOCUMENT_LIBRECHART => ['application/vnd.oasis.opendocument.chart'],
+ self::TYPE_DOCUMENT_LIBREFORMULA => ['application/vnd.oasis.opendocument.formula'],
+ self::TYPE_DOCUMENT_LIBREGRAPHIC => ['application/vnd.oasis.opendocument.graphics'],
+ self::TYPE_DOCUMENT_LIBREPRESENTATION => ['application/vnd.oasis.opendocument.presentation'],
+ self::TYPE_DOCUMENT_LIBRESPREADSHEET => ['application/vnd.oasis.opendocument.spreadsheet'],
+ self::TYPE_DOCUMENT_LIBRETEXT => ['application/vnd.oasis.opendocument.text'],
+ self::TYPE_DOCUMENT_LIBREHTML => ['application/vnd.oasis.opendocument.text-web'],
+ self::TYPE_DOCUMENT_ABIWORD => ['application/abiword', 'application/abiword-compressed'],
+ self::TYPE_DOCUMENT_MSWORD => ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/msword'],
+ self::TYPE_DOCUMENT_MSEXCEL => ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/ms-excel'],
+ self::TYPE_DOCUMENT_MSPOWERPOINT => ['application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/ms-powerpoint'],
+ ];
+
+ private static $s_extensions_container = [
+ self::TYPE_CONTAINER => ['application/*'],
+ self::TYPE_CONTAINER_TAR => ['application/tar'],
+ self::TYPE_CONTAINER_CPIO => ['application/cpio'],
+ self::TYPE_CONTAINER_JAVA => ['application/java'],
+ ];
+
+ private static $s_extensions_application = [
+ self::TYPE_APPLICATION => ['application/*'],
+ self::TYPE_APPLICATION_OCSP_REQUEST => ['application/ocsp-request'],
+ self::TYPE_APPLICATION_OCSP_RESPONSE => ['application/ocsp-response'],
+ ];
/**
*/
static function s_get_names_by_id($id, $category = NULL) {
if (!is_int($id) && !is_numeric($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
else {
if (!is_int($category)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'category', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'category', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
static function s_identify($mime, $lowercase = FALSE) {
if (!is_string($mime)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'mime', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'mime', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($lowercase)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'lowercase', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'lowercase', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$lower_mime = $mime;
}
- $information = array(
+ $information = [
'id_category' => static::CATEGORY_PROVIDED,
'id_type' => static::TYPE_PROVIDED,
'name_category' => '*',
'name_type' => '*',
- );
+ ];
if ($mime == '*/*') {
return c_base_return_array::s_new($information);
class c_base_path extends c_base_rfc_string {
use t_base_return_value_exact;
- private const DEFAULT_ALLOWED_METHODS = array(
+ private const DEFAULT_ALLOWED_METHODS = [
c_base_http::HTTP_METHOD_GET => c_base_http::HTTP_METHOD_GET,
c_base_http::HTTP_METHOD_POST => c_base_http::HTTP_METHOD_POST,
c_base_http::HTTP_METHOD_HEAD => c_base_http::HTTP_METHOD_HEAD,
c_base_http::HTTP_METHOD_OPTIONS => c_base_http::HTTP_METHOD_OPTIONS,
- );
+ ];
- private const DEFAULT_SANITIZE_HTML = array(
+ private const DEFAULT_SANITIZE_HTML = [
'flags' => ENT_HTML5 | ENT_NOQUOTES | ENT_DISALLOWED | ENT_SUBSTITUTE,
'encoding' => 'UTF-8',
- );
+ ];
protected $id_group;
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
unset($class);
// @todo: store all errors on return.
- $errors = array();
+ $errors = [];
$path->set_id_group($id_group);
$path->set_value($field_path);
unset($class);
// @todo: store all errors on return.
- $errors = array();
+ $errors = [];
$path->set_id_group($id_group);
$path->set_value($field_path);
unset($class);
// @todo: store all errors on return.
- $errors = array();
+ $errors = [];
$path->set_field_destination($field_destination);
$path->set_field_response_code($field_response_code);
*/
public function set_id_group($id_group) {
if (!is_int($id_group) || $id_group < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_group', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_group', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_field_destination($field_destination) {
if (!is_string($field_destination) && !is_array($field_destination)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'field_destination', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'field_destination', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_field_response_code($field_response_code) {
if (!is_int($field_response_code)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'field_response_code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'field_response_code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_created($date_created) {
if (!is_float($date_created) && !is_int($date_created)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_created', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_created', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_changed($date_changed) {
if (!is_float($date_changed) && !is_int($date_changed)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_changed', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_changed', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_synced($date_synced) {
if (!is_float($date_synced) && !is_int($date_synced)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_synced', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_synced', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_locked($date_locked) {
if (!is_float($date_locked) && !is_int($date_locked)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_deleted($date_deleted) {
if (!is_float($date_deleted) && !is_int($date_deleted)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_include_directory($directory) {
if (!is_string($directory) && !is_null($directory)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':argument_directory' => 'directory', ':function_directory' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'directory', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_include_name($name) {
if (!is_string($name) && !is_null($name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_allowed_method($method, $append = TRUE) {
if (!is_int($method)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'method', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'method', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!$append) {
- $this->allowed_methods = array();
+ $this->allowed_methods = [];
}
$this->allowed_methods[$method] = $method;
*/
public function set_allowed_methods($methods) {
if (!is_array($methods)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'methods', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'methods', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->allowed_methods = array();
+ $this->allowed_methods = [];
foreach ($methods as $method) {
if (is_int($method)) {
$this->allowed_methods[$method] = $method;
*/
public function set_sanitize_html($flags = NULL, $encoding = NULL) {
if (!is_null($flags) && !is_int($flags)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'flags', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'flags', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($encoding) && !is_string($encoding)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'encoding', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_path_tree($path_tree) {
if (!is_null($path_tree) && !($path_tree instanceof c_base_path_tree)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'path_tree', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'path_tree', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_content($is_content = NULL) {
if (!is_null($is_content) && !is_bool($is_content)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_alias($is_alias = NULL) {
if (!is_null($is_alias) && !is_bool($is_alias)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_alias', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_redirect($is_redirect = NULL) {
if (!is_null($is_redirect) && !is_bool($is_redirect)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_redirect', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_redirect', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_private($is_private = NULL) {
if (!is_null($is_private) && !is_bool($is_private)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_private', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_private', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_locked($is_locked = NULL) {
if (!is_null($is_locked) && !is_bool($is_locked)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_root($is_root = NULL) {
if (!is_null($is_root) && !is_bool($is_root)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_root', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_root', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
* An executed array object is returned on success.
* An executed array object with error bit set is returned on error.
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
$executed = new c_base_path_executed();
if ($this->is_redirect) {
*/
public function set_parameters(&$http, &$database, &$session, $settings) {
if (!($http instanceof c_base_http)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!($database instanceof c_base_database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!($session instanceof c_base_session)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($settings)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$this->request_uri = $request_uri;
}
else {
- $this->request_uri = array(
+ $this->request_uri = [
'scheme' => $this->settings['base_scheme'],
'authority' => $this->settings['base_host'],
'path' => $this->settings['base_path'],
'query' => NULL,
'fragment' => NULL,
'url' => TRUE,
- );
+ ];
}
unset($request_uri);
*/
protected function pr_sanitize($id, $type, $type_sub = NULL) {
if (!is_string($id) && mb_strlen($id) > 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(NULL, 'c_base_return_null', $error);
}
if (!is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(NULL, 'c_base_return_null', $error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_cookies($cookie, $append = TRUE) {
if (!($cookie instanceof c_base_cookie)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'cookie', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'cookie', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($append)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'append', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!$append || !is_array($this->cookies)) {
- $this->cookies = array();
+ $this->cookies = [];
}
$this->cookies[] = $cookie;
*/
public function set_output($output) {
if (!is_null($output) && !($output instanceof c_base_return)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'output', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'output', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_id_group($id_group) {
if (!is_int($id_group)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_group', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_group', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
public function __construct() {
parent::__construct();
- $this->paths = array();
+ $this->paths = [];
$this->root = NULL;
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function add_path($path, $handler, $include_directory = NULL, $include_name = NULL, $allowed_methods = NULL) {
if (!is_string($path)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($handler)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'handler', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'handler', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ((!is_null($include_directory) || (is_null($include_directory) && !is_null($include_name))) && !is_string($include_directory)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'include_directory', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'include_directory', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ((!is_null($include_name) || (is_null($include_name) && !is_null($include_directory))) && !is_string($include_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'include_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'include_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_null($allowed_methods)) {
$methods = $path_object->get_allowed_methods()->get_value_exact();
if (!is_array($methods)) {
- $methods = array();
+ $methods = [];
}
}
else {
if (mb_strlen($path) == 0) {
unset($path_object);
- $this->root = array('handler' => $handler, 'include_directory' => $include_directory, 'include_name' => $include_name, 'is_root' => TRUE, 'methods' => $methods);
+ $this->root = ['handler' => $handler, 'include_directory' => $include_directory, 'include_name' => $include_name, 'is_root' => TRUE, 'methods' => $methods];
return new c_base_return_true();
}
if (!is_null($allowed_methods) && !is_array($allowed_methods)) {
unset($path_object);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'allowed_methods', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'allowed_methods', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
unset($path_object);
unset($valid_path);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
unset($valid_path);
}
if (!is_array($this->paths)) {
- $this->paths = array();
+ $this->paths = [];
}
if (!array_key_exists($id_group, $this->paths)) {
- $this->paths[$id_group] = array();
+ $this->paths[$id_group] = [];
}
$path_tree = &$this->paths[$id_group];
// note that 'paths' is not populated here, but is later used when being processed by self::find_path().
$path_part = array_shift($path_parts);
if (!array_key_exists($path_part, $path_tree)) {
- $path_tree[$path_part] = array(
- 'paths' => array(),
+ $path_tree[$path_part] = [
+ 'paths' => [],
'include_directory' => NULL,
'include_name' => NULL,
'handler' => NULL,
- 'methods' => array(),
- );
+ 'methods' => [],
+ ];
}
$path_tree = &$path_tree[$path_part];
else {
foreach ($path_parts as $path_part) {
if (!isset($path_tree['paths'][$path_part])) {
- $path_tree['paths'][$path_part] = array(
- 'paths' => array(),
+ $path_tree['paths'][$path_part] = [
+ 'paths' => [],
'include_directory' => NULL,
'include_name' => NULL,
'handler' => NULL,
- 'methods' => array(),
- );
+ 'methods' => [],
+ ];
}
$path_tree = &$path_tree['paths'][$path_part];
*/
public function find_path($path_string) {
if (!is_null($path_string) && !is_string($path_string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'path_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'path_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (is_array($this->root)) {
$root_array = $this->root;
$root_array['id_group'] = 0;
- $root_array['path_tree'] = array();
+ $root_array['path_tree'] = [];
return c_base_return_array::s_new($root_array);
}
'handler' => NULL,
'methods' => NULL,
'id_group' => 0,
- 'path_tree' => array(),
+ 'path_tree' => [],
));
}
if (!$path->set_value($path_string)) {
unset($path);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'path_string', ':{expected_format}' => 'Valid URL path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'path_string', ':{expected_format}' => 'Valid URL path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
$depth_total = count($path_parts);
$found = NULL;
$path_tree = &$this->paths[$id_group];
- $path_tree_history = array();
+ $path_tree_history = [];
if (is_array($this->root)) {
$path_tree_history[] = $this->root;
$path_tree = &$path_tree['%'];
}
- $path_tree_history[] = array(
+ $path_tree_history[] = [
'path' => $path_part,
'include_directory' => isset($path_tree['include_directory']) ? $path_tree['include_directory'] : NULL,
'include_name' => isset($path_tree['include_name']) ? $path_tree['include_name'] : NULL,
'handler' => isset($path_tree['handler']) ? $path_tree['handler'] : NULL,
'methods' => isset($path_tree['methods']) ? $path_tree['methods'] : NULL,
- );
+ ];
if ($depth_current == $depth_total) {
- $found = array(
+ $found = [
'include_directory' => $path_tree['include_directory'],
'include_name' => $path_tree['include_name'],
'handler' => $path_tree['handler'],
'methods' => $path_tree['methods'],
'id_group' => $id_group,
'path_tree' => $path_tree_history,
- );
+ ];
}
else {
foreach ($path_parts as $path_part) {
break;
}
- $path_tree_history[] = array(
+ $path_tree_history[] = [
'path' => $path_part,
'include_directory' => isset($path_tree['include_directory']) ? $path_tree['include_directory'] : NULL,
'include_name' => isset($path_tree['include_name']) ? $path_tree['include_name'] : NULL,
'handler' => isset($path_tree['handler']) ? $path_tree['handler'] : NULL,
'methods' => isset($path_tree['methods']) ? $path_tree['methods'] : NULL,
- );
+ ];
if ($depth_current == $depth_total) {
- $found = array(
+ $found = [
'include_directory' => $path_tree['include_directory'],
'include_name' => $path_tree['include_name'],
'handler' => $path_tree['handler'],
'methods' => $path_tree['methods'],
'id_group' => $id_group,
'path_tree' => $path_tree_history,
- );
+ ];
break;
}
}
* Class constructor.
*/
public function __construct() {
- $this->errors = array();
+ $this->errors = [];
}
/**
}
if (is_null($error)) {
- $this->errors = array();
+ $this->errors = [];
return TRUE;
}
if (!is_array($this->errors)) {
- $this->errors = array();
+ $this->errors = [];
}
if (is_null($delta)) {
*/
public function get_error($delta = NULL) {
if (!is_array($this->errors)) {
- $this->errors = array();
+ $this->errors = [];
}
if (is_null($delta)) {
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
}
unset($unserialized);
- $this->value = array();
+ $this->value = [];
return FALSE;
}
}
unset($decoded);
- $this->value = array();
+ $this->value = [];
return FALSE;
}
*/
public function get_value_exact() {
if (!is_array($this->value)) {
- return array();
+ return [];
}
return $this->value;
}
if (!is_array($this->value)) {
- $this->value = array();
+ $this->value = [];
}
if (!array_key_exists($key, $this->value)) {
*/
public function get_value_keys() {
if (empty($this->value)) {
- return array();
+ return [];
}
return array_keys($this->value);
* @see: c_base_utf8::s_ordinals_to_string_array()
*/
protected function pr_rfc_string_prepare($text) {
- $result = array(
- 'ordinals' => array(),
- 'characters' => array(),
+ $result = [
+ 'ordinals' => [],
+ 'characters' => [],
'invalid' => FALSE,
- );
+ ];
$ordinals = c_base_utf8::s_string_to_ordinals($text);
if ($ordinals instanceof c_base_return_false) {
* @see: c_base_utf8::s_ordinals_to_string_array()
*/
protected function pr_rfc_string_prepare_ordinals($text) {
- $result = array(
- 'ordinals' => array(),
- 'characters' => array(),
+ $result = [
+ 'ordinals' => [],
+ 'characters' => [],
'invalid' => FALSE,
- );
+ ];
$ordinals = c_base_utf8::s_string_to_ordinals($text);
if ($ordinals instanceof c_base_return_false) {
* @see: base_rfc_char::pr_rfc_char_qtext()
*/
protected function pr_rfc_string_is_quoted_string($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
- 'comments' => array(
+ $result = [
+ 'comments' => [
'before' => NULL,
'after' => NULL,
- ),
+ ],
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* - 'invalid': a boolean representing whether or not this string is valid or if an error occurred.
*/
protected function pr_rfc_string_is_entity_tag($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* - 'invalid': a boolean representing whether or not this string is valid or if an error occurred.
*/
protected function pr_rfc_string_is_comment($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'comment' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_digit()
*/
protected function pr_rfc_string_is_digit($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc7230#section-3.2.6
*/
protected function pr_rfc_string_is_token($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc7230#section-3.2.6
*/
protected function pr_rfc_string_is_token68($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc7234#section-5.2.3
*/
protected function pr_rfc_string_is_token_quoted($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc7235#appendix-C
*/
protected function pr_rfc_string_is_credentials($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'scheme' => NULL,
- 'parameters' => array(),
+ 'parameters' => [],
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc7233#appendix-D
*/
protected function pr_rfc_string_is_range($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
// @todo: this looks like a lot of work, so deal with this at some point in the future because this is a low to moderate priority function.
$result['invalid'] = TRUE;
* @see: base_rfc_char::pr_rfc_char_is_wsp()
*/
protected function pr_rfc_string_is_basic($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_text()
*/
protected function pr_rfc_string_is_text($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_atext()
*/
protected function pr_rfc_string_is_atext($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_dtext()
*/
protected function pr_rfc_string_is_dtext($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_qtext()
*/
protected function pr_rfc_string_is_qtext($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* - 'invalid': a boolean representing whether or not this string is valid or if an error occurred.
*/
protected function pr_rfc_string_is_negotiation($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
- 'choices' => array(),
+ $result = [
+ 'choices' => [],
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
return $result;
}
- $choice = array(
+ $choice = [
'choice' => NULL,
'weight' => NULL,
- );
+ ];
for (; $result['current'] < $stop; $result['current']++) {
$code = $ordinals[$result['current']];
// the weight has been identified, so store its value and prepare for another run.
$choice['weight'] = $weight;
if (!isset($result['choices'][$weight])) {
- $result['choices'][$weight] = array();
+ $result['choices'][$weight] = [];
}
// strip out leading and trailing whitespace.
$result['choices'][$weight][$choice['choice']] = $choice;
unset($weight);
- $choice = array(
+ $choice = [
'choice' => NULL,
'weight' => NULL,
- );
+ ];
if ($result['current'] >= $stop) {
break;
// this is an unweighted choice.
$choice['weight'] = NULL;
if (!isset($result['choices'][NULL])) {
- $result['choices'][NULL] = array();
+ $result['choices'][NULL] = [];
}
// strip out leading and trailing whitespace.
$result['choices'][NULL][$choice['choice']] = $choice;
- $choice = array(
+ $choice = [
'choice' => NULL,
'weight' => NULL,
- );
+ ];
continue;
}
if ($choice['choice'] != NULL) {
$choice['weight'] = NULL;
if (!isset($result['choices'][NULL])) {
- $result['choices'][NULL] = array();
+ $result['choices'][NULL] = [];
}
// strip out leading and trailing whitespace.
* @see: https://tools.ietf.org/html/rfc2616#section-3.7
*/
protected function pr_rfc_string_is_media_type($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'media' => NULL,
- 'parameters' => array(),
+ 'parameters' => [],
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc2616#section-3.7
*/
protected function pr_rfc_string_is_valued_token($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'tokens' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc2616#section-3.7
*/
protected function pr_rfc_string_is_valued_token_comma($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'tokens' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc7230#appendix-B
*/
protected function pr_rfc_string_is_commad_token($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'tokens' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc3986#section-3.4
*/
protected function pr_rfc_string_is_path($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc3986#section-3.4
*/
protected function pr_rfc_string_is_query($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc2616#section-3.7
*/
protected function pr_rfc_string_is_ip_literal($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'address' => NULL,
'is_future' => FALSE,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
}
if ($result['is_future']) {
- $result['address'] = array(
+ $result['address'] = [
'version' => NULL,
'ip' => NULL,
- );
+ ];
$result['current']++;
if ($result['current'] >= $stop) {
* @see: base_rfc_char::pr_rfc_char_is_digit()
*/
protected function pr_rfc_string_is_alpha_numeric_dash($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_digit()
*/
protected function pr_rfc_string_is_numeric($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_hexdigit()
*/
protected function pr_rfc_string_is_hexanumeric($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: base_rfc_char::pr_rfc_char_is_vchar()
*/
protected function pr_rfc_string_is_directive_value($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'text' => NULL,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
* @see: https://tools.ietf.org/html/rfc3986
*/
protected function pr_rfc_string_is_uri($ordinals, $characters, $start = 0, $stop = NULL) {
- $result = array(
+ $result = [
'scheme' => NULL,
'authority' => NULL,
'path' => NULL,
'url' => TRUE,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
if (is_null($stop)) {
$stop = count($ordinals);
$value = $array[$key];
unset($array[$key]);
- $new_array = array(
+ $new_array = [
$key => $value,
- );
+ ];
unset($value);
foreach ($array as $key => $value) {
$query_value = NULL;
$no_value = FALSE;
- $result['query'] = array();
+ $result['query'] = [];
for (; $result['current'] < $stop; $result['current']++) {
if (!array_key_exists($result['current'], $ordinals) || !array_key_exists($result['current'], $characters)) {
unset($code);
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_role($role, $value) {
if (!is_int($role)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'role', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'role', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($value)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'value', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_roles($roles) {
if (!is_array($roles)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'roles', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'roles', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_role($role) {
if (!is_int($role)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'role', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'role', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
* An array with error bit set is returned on error.
*/
public function get_roles() {
- $roles = array();
+ $roles = [];
if ($this->public) {
$roles[static::PUBLIC] = static::PUBLIC;
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_socket_directory($socket_directory) {
if (!is_null($socket_directory) && (!is_string($socket_directory) || empty($socket_directory))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'socket_directory', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'socket_directory', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_dir($socket_directory)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{directory_name}' => $socket_directory, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_DIRECTORY);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{directory_name}' => $socket_directory, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_DIRECTORY);
return c_base_return_error::s_false($error);
}
*/
public function set_cookie($cookie) {
if (!is_null($cookie) && !($cookie instanceof c_base_cookie)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'cookie', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'cookie', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_system_name($system_name) {
if (!is_null($system_name) && (!is_string($system_name) || empty($system_name))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'system_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'system_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_name($name) {
if (!is_null($name) && (!is_string($name) || empty($name))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (mb_strlen($name) == 0 || preg_match('/^(\w|-)+$/i', $name) != 1) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{format_name}' => 'name', ':{expected_format}' => '. Alphanumeric and dash characters only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_FORMAT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{format_name}' => 'name', ':{expected_format}' => '. Alphanumeric and dash characters only', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_FORMAT);
return c_base_return_error::s_false($error);
}
*/
public function set_host($host) {
if (!is_null($host) && (!is_string($host) || empty($host))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (mb_strlen($host) == 0 || ip2long($host) === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_password($password) {
if (!is_null($password) && (!is_string($password) || empty($password))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
// deny 0-length passwords.
if (mb_strlen($password) == 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_setting($delta, $setting) {
if (!is_int($delta) && !is_string($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($this->settings)) {
- $this->settings = array();
+ $this->settings = [];
}
$this->settings[$delta] = $setting;
*/
public function set_settings($settings) {
if (!is_null($settings) && !is_array($settings)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_session_id($session_id) {
if (!is_null($session_id) && (!is_string($session_id) || empty($session_id))) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
// deny 0-length session_id.
if (mb_strlen($session_id) == 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_timeout_expire($timeout_expire) {
if (!is_null($timeout_expire) && !is_int($timeout_expire)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timeout_expire', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timeout_expire', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_timeout_max($timeout_max) {
if (!is_null($timeout_max) && !is_int($timeout_max)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timeout_max', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timeout_max', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_problems($problems) {
if (!is_null($problems) && !is_array($problems)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'problems', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'problems', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $this->problems = array();
+ $this->problems = [];
if (is_null($problems)) {
return new c_base_return_true();
*/
public function set_socket_timeout($seconds, $microseconds = 0, $receive = TRUE) {
if (!is_null($seconds) && (!is_int($seconds) || $seconds < 0)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'seconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($microseconds) || $microseconds < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'microseconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'microseconds', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($receive)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'receive', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'receive', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_array($this->socket_timeout)) {
- $this->socket_timeout = array(
+ $this->socket_timeout = [
'send' => NULL,
'receive' => NULL,
- );
+ ];
}
if ($receive) {
- $this->socket_timeout['receive'] = array('seconds' => $seconds, 'microseconds' => $microseconds);
+ $this->socket_timeout['receive'] = ['seconds' => $seconds, 'microseconds' => $microseconds];
if (is_resource($this->socket)) {
$result = @socket_set_option($this->socket, SOL_SOCKET, SO_RCVTIMEO, $seconds, $microseconds);
if ($result === FALSE) {
unset($result);
$this->socket_error = @socket_last_error($this->socket);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_set_option', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_set_option', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
return c_base_return_error::s_false($error);
}
unset($result);
}
}
else {
- $this->socket_timeout['send'] = array('seconds' => $seconds, 'microseconds' => $microseconds);
+ $this->socket_timeout['send'] = ['seconds' => $seconds, 'microseconds' => $microseconds];
if (is_resource($this->socket)) {
$result = @socket_set_option($this->socket, SOL_SOCKET, SO_SNDTIMEO, $seconds, $microseconds);
if ($result === FALSE) {
unset($result);
$this->socket_error = @socket_last_error($this->socket);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_set_option', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_set_option', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
return c_base_return_error::s_false($error);
}
unset($result);
*/
public function set_user_current($user) {
if (!is_null($user) && !($user instanceof c_base_users_user)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_user_session($user) {
if (!is_null($user) && !($user instanceof c_base_users_user)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_setting($delta) {
if (!is_int($delta) && !is_string($delta)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'delta', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!array_key_exists($delta, $this->settings)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{index_name}' => $delta, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{index_name}' => $delta, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_ARRAY_INDEX);
return c_base_return_error::s_false($error);
}
*/
public function get_problems() {
if (is_null($this->problems)) {
- $this->problems = array();
+ $this->problems = [];
}
return c_base_return_array::s_new($this->problems);
return clone($this->user_current);
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{data_name}' => 'user_current', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_DEFINED);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{data_name}' => 'user_current', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_DEFINED);
return c_base_return_error::s_return('c_base_users_user', $error);
}
return clone($this->user_session);
}
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{data_name}' => 'user_session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_DEFINED);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{data_name}' => 'user_session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_DEFINED);
return c_base_return_error::s_return('c_base_users_user', $error);
}
*/
public function is_logged_in($is_logged_in = NULL) {
if (!is_null($is_logged_in) && !is_bool($is_logged_in)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_logged_in', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_logged_in', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_expired($is_expired = NULL) {
if (!is_null($is_expired) && !is_bool($is_expired)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_expired', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_expired', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
function do_connect() {
if (is_resource($this->socket)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (is_null($this->system_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->system_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->system_name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
@socket_clear_error();
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_create', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_create', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
return c_base_return_error::s_false($error);
}
$this->do_disconnect();
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_connect', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_connect', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
return c_base_return_error::s_false($error);
}
unset($connected);
*/
public function do_disconnect() {
if (!is_resource($this->socket)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
*/
public function do_pull() {
if (is_null($this->host)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (is_null($this->session_id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->socket)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (empty($response['result']) || !is_array($response['result'])) {
unset($response);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_push($interval_expire = NULL, $interval_max = NULL) {
if (is_null($this->name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->name', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (is_null($this->host)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (is_null($this->password)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->password', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->socket)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (!is_null($interval_expire) && (!is_int($interval_expire) || $interval_expire < 1)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'interval_expires', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'interval_expires', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($interval_max) && (!is_int($interval_max) || $interval_max < 1)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'interval_max', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'interval_max', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
// settings is allowed to be undefined, so send it as an empty array.
if (is_null($this->settings)) {
- $this->settings = array();
+ $this->settings = [];
}
$response = $this->p_transfer(array('name' => $this->name, 'ip' => $this->host, 'password' => $this->password, 'expire' => $interval_expire, 'max' => $interval_max, 'settings' => $this->settings));
$response = c_base_return_array::s_value_exact($response);
if (isset($response['error']) && isset($response['error']['message']) && is_string($response['error']['message'])) {
- $error = c_base_error::s_log(' ' . $response['error']['message'], array('arguments' => array(':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(' ' . $response['error']['message'], ['arguments' => [':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
unset($response);
return c_base_return_error::s_false($error);
elseif (empty($response['result']) || !is_array($response['result'])) {
unset($response);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_terminate() {
if (is_null($this->host)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->host', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (is_null($this->session_id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->session_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (!is_resource($this->socket)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (empty($response['result']) || !is_array($response['result'])) {
unset($response);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public function do_flush() {
if (!is_resource($this->socket)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->socket', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
if (empty($response['result']) || !is_array($response['result'])) {
unset($response);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_transfer', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
$this->socket_error = @socket_last_error($this->socket);
@socket_clear_error($this->socket);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_write', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_write', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
return c_base_return_error::s_false($error);
}
elseif ($written == 0) {
unset($written);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_write', ':{socket_error}' => NULL, ':{socket_error_message}' => 'No bytes written.', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_write', ':{socket_error}' => NULL, ':{socket_error_message}' => 'No bytes written.', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
return c_base_return_error::s_false($error);
}
unset($written);
$this->socket_error = @socket_last_error($this->socket);
@socket_clear_error($this->socket);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_read', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_read', ':{socket_error}' => $this->socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
return c_base_return_error::s_false($error);
}
unset($json);
if ($response === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'json_decode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'json_decode', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_id($id) {
if (!is_int($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_id_external($id_external) {
if (!is_int($id_external)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_external', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_external', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_id_sort($id_sort) {
if (!is_int($id_sort)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_sort', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_sort', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_name_machine($name_machine) {
if (!is_string($name_machine)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name_machine', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name_machine', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_name_human($name_human) {
if (!($name_human instanceof c_base_users_user_name)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'name_human', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'name_human', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_address_email($address_email) {
if (!($address_email instanceof c_base_address_email)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'address_email', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'address_email', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_created($date_created) {
if (!is_int($date_created) && !is_float($date_created)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_created', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_created', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_changed($date_changed) {
if (!is_int($date_changed) && !is_float($date_changed)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_changed', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_changed', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_synced($date_synced) {
if (!is_int($date_synced) && !is_float($date_synced)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_synced', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_synced', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_locked($date_locked) {
if (!is_int($date_locked) && !is_float($date_locked)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_date_deleted($date_deleted) {
if (!is_int($date_deleted) && !is_float($date_deleted)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_image_original($image_original) {
if (!is_int($image_original) && !is_null($image_original)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'image_original', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'image_original', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_image_cropped($image_cropped) {
if (!is_int($image_cropped) && !is_null($image_cropped)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'image_cropped', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'image_cropped', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_image_icon($image_icon) {
if (!is_int($image_icon) && !is_null($image_icon)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'image_icon', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'image_icon', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_private($is_private = NULL) {
if (!is_null($is_private) && !is_bool($is_private)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_private', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_private', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_locked($is_locked = NULL) {
if (!is_null($is_locked) && !is_bool($is_locked)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_locked', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_deleted($is_deleted = NULL) {
if (!is_null($is_deleted) && !is_bool($is_deleted)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_deleted', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function is_roler($is_roler = NULL) {
if (!is_null($is_roler) && !is_bool($is_roler)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'is_roler', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'is_roler', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function set_prefix($prefix) {
if (!is_string($prefix)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'prefix', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'prefix', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_first($first) {
if (!is_string($first)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'first', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'first', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_middle($middle) {
if (!is_string($middle)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'middle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'middle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_last($last) {
if (!is_string($last)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'last', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'last', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_suffix($suffix) {
if (!is_string($suffix)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'suffix', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'suffix', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_complete($complete) {
if (!is_string($complete)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'complete', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'complete', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_is_UTF_8($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_character_to_ordinal($character) {
if (!is_string($character)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($ordinal === FALSE) {
unset($ordinal);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_character_to_ordinal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_character_to_ordinal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public static function s_ordinal_to_character($ordinal) {
if (!is_int($ordinal)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ordinal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ordinal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_length_string($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
if ($length === FALSE) {
unset($length);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_length_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_length_string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_clean($text, $remove_bom = FALSE) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_bool($remove_bom)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'remove_bom', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'remove_bom', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if ($sanitized === FALSE) {
unset($sanitized);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_clean', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_clean', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_split($text, $split_length = 1) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_int($split_length)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'split_length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'split_length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if ($split === FALSE) {
unset($split);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_split', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_split', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_character_size_list($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
$size_list = self::p_s_character_size_list($text);
if ($size_list === FALSE) {
unset($size_list);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_character_size_list', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_character_size_list', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
return c_base_return_array::s_new($size_list);
*/
public static function s_character_max_width($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
if ($size_list === FALSE) {
unset($size_list);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_character_size_list', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_character_size_list', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value(0, 'c_base_return_int', $error);
}
*/
public static function s_encode_html_character($character) {
if (!is_string($character)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if ($encoded === FALSE) {
unset($encoded);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_encode_html_character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_encode_html_character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_encode_html($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if ($split === FALSE) {
unset($split);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_split', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_split', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
- $new_array = array();
+ $new_array = [];
foreach ($split as $character) {
$encoded = self::p_s_character_to_ordinal($character);
if ($encoded === FALSE) {
*/
public static function s_substring($text, $start = 0, $length = NULL) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_int($start)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'start', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'start', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_null($length) && !is_int($length)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_lowercase($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_uppercase($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_is_bom($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_file_has_bom($file_path) {
if (!is_string($file_path)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'file_path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'file_path', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!file_exists($file_path)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{file_name}' => $file_path, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_FILE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{file_name}' => $file_path, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_FILE);
return c_base_return_error::s_false($error);
}
*/
public static function s_string_has_bom($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_prepend_bom($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_reverse($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if ($split === FALSE) {
unset($split);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_split', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_split', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_position_string($haystack, $needle, $offset = 0) {
if (!is_string($haystack)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'haystack', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'haystack', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($needle) && !is_string($needle)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'needle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'needle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($offset) || $offset < 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'offset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'offset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_string_to_ordinals($text) {
if (!is_string($text) && !is_array($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_ordinals_to_string($ordinals) {
if (!is_array($ordinals)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ordinals', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ordinals', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $errors = array();
+ $errors = [];
$string = '';
foreach ($ordinals as $ordinal) {
$character = self::p_s_ordinal_to_character($ordinal);
if ($character === FALSE) {
- $errors[] = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_s_ordinal_to_character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $errors[] = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_s_ordinal_to_character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
continue;
}
*/
public static function s_ordinals_to_string_array($ordinals) {
if (!is_array($ordinals)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ordinals', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
- return c_base_return_error::s_value(array(), 'c_base_return_array', $error);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ordinals', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
+ return c_base_return_error::s_value([], 'c_base_return_array', $error);
}
- $errors = array();
- $array = array();
+ $errors = [];
+ $array = [];
foreach ($ordinals as $ordinal) {
$character = self::p_s_ordinal_to_character($ordinal);
if ($character === FALSE) {
- $errors[] = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'this->p_s_ordinal_to_character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $errors[] = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'this->p_s_ordinal_to_character', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
continue;
}
*/
public static function s_ordinal_array_to_string($ordinals) {
if (!is_array($ordinals)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ordinals', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ordinals', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
- $array = array();
+ $array = [];
foreach ($ordinals as $key => $ordinal) {
$array[$key] = self::p_s_ordinal_to_character($ordinal);
}
*/
public static function s_ordinal_to_codepoint($ordinal) {
if (!is_int($ordinal)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'ordinal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'ordinal', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($codepoint === FALSE) {
unset($codepoint);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_orginal_to_codepoint', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_orginal_to_codepoint', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
*/
public static function s_count_substrings($haystack, $needle, $offset = 0, $length = NULL) {
if (!is_string($haystack)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'haystack', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'haystack', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($needle)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'needle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'needle', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($offset)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'offset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'offset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($length) && !is_int($length)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'length', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_is_ascii($text) {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_strip_tags($text, $allowable_tags = '') {
if (!is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($allowable_tags)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'allowable_tags', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'allowable_tags', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if ($sanitized === FALSE) {
unset($sanitized);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'self::p_s_clean', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'self::p_s_clean', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
$text = self::p_s_split($text);
}
- $ordinals = array();
+ $ordinals = [];
foreach ($text as $character) {
$value = self::p_s_character_to_ordinal($character);
if ($value === FALSE) {
* @see: self::s_split()
*/
private static function p_s_split($text, $split_length = 1) {
- $split = array();
+ $split = [];
$text = self::p_s_clean($text);
preg_match_all('/\X/u', $text, $split);
return FALSE;
}
- $array = array();
+ $array = [];
foreach ($split as $key => $value) {
$array[$key] = implode($value);
}
}
if (empty($split) || $split[0] === '') {
- return array();
+ return [];
}
return $split;
return FALSE;
}
- $array = array();
+ $array = [];
foreach ($split as $key => $value) {
$array[$key] = strlen($value);
}
* FALSE without error bit set is returned if nothing was done.
* FALSE with error bit set is returned on error.
*/
- public function pull(&$database, $query = NULL, $arguments = array(), $conditions = NULL, $limit = NULL, $offset = NULL, $group_by = NULL, $order_by = NULL) {
+ public function pull(&$database, $query = NULL, $arguments = [], $conditions = NULL, $limit = NULL, $offset = NULL, $group_by = NULL, $order_by = NULL) {
if (!($database instanceof c_base_database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($query) && !is_string($query)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'query', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($arguments)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'arguments', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'arguments', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($conditions) && !is_string($conditions)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'conditions', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($limit) && !is_string($limit)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'limit', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($offset) && !is_string($offset)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'offset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'offset', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($group_by) && !is_string($group_by)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'group_by', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'group_by', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($order_by) && !is_string($order_by)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'order_by', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'order_by', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_array($this->warnings)) {
- $this->warnings = array();
+ $this->warnings = [];
}
- $this->warnings[] = array(
+ $this->warnings[] = [
'code' => (int) $code,
'message' => (string) $message,
'file_name' => (is_null($file_name) ? NULL : (string) $file_name),
'line_number' => (is_null($line_number) ? NULL : (int) $line_number),
'context' => (is_null($context) ? NULL : (array) $context),
- );
+ ];
return TRUE;
}
/**
* Write a log to the database, associated with the current user.
*/
- public function do_log_user($log_type, $response_code, $data = array()) {
+ public function do_log_user($log_type, $response_code, $data = []) {
if (!is_int($log_type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'log_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'log_type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($response_code)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'response_code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'response_code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$query_string = 'insert into v_log_users_self_insert (log_title, log_type, log_type_sub, log_severity, log_facility, request_client, response_code, log_details)';
$query_string .= ' values ($1, $2, $3, $4, $5, ($6, $7, $8), $9, $10)';
- $query_parameters = array();
+ $query_parameters = [];
$query_parameters[5] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0';
$query_parameters[6] = isset($_SERVER['REMOTE_PORT']) && is_numeric($_SERVER['REMOTE_PORT']) ? (int) $_SERVER['REMOTE_PORT'] : 0;
$query_parameters[7] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '' ;
unset($query_result);
if (!empty($last_error)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_ERROR);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_ERROR);
$false->set_error($error);
}
unset($last_error);
public function __construct() {
parent::__construct();
- $this->settings = array();
+ $this->settings = [];
// database information
$this->settings['database_host'] = '127.0.0.1';
$this->settings['ldap_bind_name'] = NULL;
$this->settings['ldap_bind_password'] = NULL;
$this->settings['ldap_base_dn'] = '';
- $this->settings['ldap_fields'] = array();
+ $this->settings['ldap_fields'] = [];
// base settings
$this->settings['base_scheme'] = 'https';
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public static function s_do_initialize_database(&$database) {
if (!($database instanceof c_base_database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
else {
$this->languages_selected = i_base_languages::ENGLISH_US;
- $this->languages_all = array(i_base_languages::ENGLISH_US => i_base_languages::ENGLISH_US, i_base_languages::ENGLISH => i_base_languages::ENGLISH);
+ $this->languages_all = [i_base_languages::ENGLISH_US => i_base_languages::ENGLISH_US, i_base_languages::ENGLISH => i_base_languages::ENGLISH];
}
// select the primary language.
unset($cookie_login);
unset($no_session);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{session_name}' => $this->settings['cookie_name'], ':{function_name}' => __FUNCTION__)), i_base_error_messages::NO_SESSION);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{session_name}' => $this->settings['cookie_name'], ':{function_name}' => __FUNCTION__]], i_base_error_messages::NO_SESSION);
return c_base_return_error::s_true($error);
}
unset($no_session);
unset($cookie_login);
// cookie_login failed validation or the cookie contains no session id.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{session_name}' => $this->settings['cookie_name'], ':{function_name}' => __FUNCTION__)), i_base_error_messages::SESSION_INVALID);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{session_name}' => $this->settings['cookie_name'], ':{function_name}' => __FUNCTION__]], i_base_error_messages::SESSION_INVALID);
// also set the error on the session object.
$this->session->set_error($error);
$query_string = 'insert into v_log_user_activity_self_insert (request_path, request_arguments, request_client, request_headers, response_headers, response_code)';
$query_string .= ' values ($1, $2, ($3, $4, $5), $6, $7, $8)';
- $query_parameters = array();
+ $query_parameters = [];
$query_parameters[0] = $this->http->get_request_uri_relative($this->settings['base_path'])->get_value_exact();
$query_parameters[1] = $this->http->get_request_uri_query($this->settings['base_path'])->get_value_exact();
unset($query_result);
if (!empty($last_error)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_ERROR);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_ERROR);
$false->set_error($error);
}
unset($last_error);
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
* The created markup tag with error bit set on error.
*/
protected function pr_create_html_create_menu($name_machine = NULL, $name_human = NULL, $depth = 1) {
- $menu = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_NAVIGATION, $name_machine, array(static::CSS_MENU));
+ $menu = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_NAVIGATION, $name_machine, [static::CSS_MENU]);
if (is_string($name_human)) {
- $wrapper = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, array(static::CSS_MENU_HEADER, static::CSS_MENU_HEADER . '-' . $depth));
+ $wrapper = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, [static::CSS_MENU_HEADER, static::CSS_MENU_HEADER . '-' . $depth]);
if ($depth == 1) {
$type = c_base_markup_tag::TYPE_H1;
$type = c_base_markup_tag::TYPE_HX;
}
- $header = c_theme_html::s_create_tag($type, NULL, array(static::CSS_MENU_HEADER_TEXT, static::CSS_MENU_HEADER_TEXT . '-' . $depth));
+ $header = c_theme_html::s_create_tag($type, NULL, [static::CSS_MENU_HEADER_TEXT, static::CSS_MENU_HEADER_TEXT . '-' . $depth]);
unset($type);
if ($depth > 6) {
* Markup tag with error bit set on error.
*/
protected function pr_create_html_add_menu_item_label($label, $tooltip = NULL) {
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, array(static::CSS_MENU_ITEM, static::CSS_ITEM_LABEL));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, [static::CSS_MENU_ITEM, static::CSS_ITEM_LABEL]);
- $tag_content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SPAN, NULL, array(static::CSS_MENU_ITEM_CONTENT));
+ $tag_content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SPAN, NULL, [static::CSS_MENU_ITEM_CONTENT]);
$tag_content->set_text($label);
if (is_string($tooltip)) {
* Markup tag with error bit set on error.
*/
protected function pr_create_html_add_menu_item_link($label, $uri, $tooltip = NULL, $local = TRUE) {
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, array(static::CSS_MENU_ITEM, static::CSS_ITEM_LINK));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, [static::CSS_MENU_ITEM, static::CSS_ITEM_LINK]);
if ($local) {
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_CLASS, static::CSS_ITEM_LOCAL);
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_CLASS, static::CSS_ITEM_REMOTE);
}
- $tag_content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_A, NULL, array(static::CSS_MENU_ITEM_CONTENT));
+ $tag_content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_A, NULL, [static::CSS_MENU_ITEM_CONTENT]);
$tag_content->set_text($label);
$tag_content->set_attribute(c_base_markup_attributes::ATTRIBUTE_HREF, $uri);
* Markup tag with error bit set on error.
*/
protected function pr_create_html_add_menu_item_menu($label, $menu, $tooltip = NULL) {
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, array(static::CSS_MENU_ITEM, static::CSS_ITEM_MENU));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, [static::CSS_MENU_ITEM, static::CSS_ITEM_MENU]);
$tag->set_text($label);
- $tag_content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SPAN, NULL, array(static::CSS_MENU_ITEM_CONTENT));
+ $tag_content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SPAN, NULL, [static::CSS_MENU_ITEM_CONTENT]);
$tag_content->set_tag($menu);
if (is_string($tooltip)) {
* @param array $arguments
* (optional) An array of arguments to convert into text.
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
return '';
}
$this->http = NULL;
$this->database = NULL;
$this->session = NULL;
- $this->settings = array();
+ $this->settings = [];
- $this->languages = array();
+ $this->languages = [];
$this->language_alias = NULL;
$this->text_type = NULL;
$this->request_uri = NULL;
$this->breadcrumbs = NULL;
- $this->arguments = array();
+ $this->arguments = [];
$this->output_format = c_base_mime::TYPE_TEXT_HTML;
}
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
return $executed;
$this->languages = $this->http->get_response_content_language()->get_value_exact();
if (!is_array($this->languages)) {
- $this->languages = array();
+ $this->languages = [];
}
$this->pr_get_language_alias();
if (mb_strlen($path) == 0) {
unset($path);
- $this->arguments = array();
+ $this->arguments = [];
return FALSE;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_section($headers = NULL, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_SECTION, static::CSS_AS_SECTION);
+ protected function pr_create_tag_section($headers = NULL, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_SECTION, static::CSS_AS_SECTION];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_wrapper($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_WRAPPER, static::CSS_AS_WRAPPER);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_WRAPPER, static::CSS_AS_WRAPPER];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_break($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_BREAK, static::CSS_AS_BREAK);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_BREAK, static::CSS_AS_BREAK];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_text($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT);
+ protected function pr_create_tag_text($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_header($text, $header, $arguments = array(), $id = NULL, $extra_class = NULL, $prepend = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_HEADER, static::CSS_AS_HEADER, static::CSS_AS_HEADER . '-' . $header);
+ protected function pr_create_tag_header($text, $header, $arguments = [], $id = NULL, $extra_class = NULL, $prepend = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_HEADER, static::CSS_AS_HEADER, static::CSS_AS_HEADER . '-' . $header];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_headers($headers, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_HEADERS, static::CSS_AS_HEADERS);
+ protected function pr_create_tag_headers($headers, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_HEADERS, static::CSS_AS_HEADERS];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_paragraph($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_PARAGRAPH, static::CSS_AS_PARAGRAPH);
+ protected function pr_create_tag_paragraph($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_PARAGRAPH, static::CSS_AS_PARAGRAPH];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_text_block($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TEXT_BLOCK, static::CSS_AS_TEXT_BLOCK);
+ protected function pr_create_tag_text_block($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TEXT_BLOCK, static::CSS_AS_TEXT_BLOCK];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
if (!is_null($text)) {
if (is_int($text)) {
- $tag = c_theme_html::s_create_tag($this->text_type, NULL, array($this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT), $this->pr_get_text($text, $arguments));
+ $tag = c_theme_html::s_create_tag($this->text_type, NULL, [$this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT], $this->pr_get_text($text, $arguments));
}
else {
- $tag = c_theme_html::s_create_tag($this->text_type, NULL, array($this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT), $text);
+ $tag = c_theme_html::s_create_tag($this->text_type, NULL, [$this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT], $text);
}
$block->set_tag($tag);
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_paragraph_block($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_PARAGRAPH_BLOCK, static::CSS_AS_PARAGRAPH_BLOCK);
+ protected function pr_create_tag_paragraph_block($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_PARAGRAPH_BLOCK, static::CSS_AS_PARAGRAPH_BLOCK];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
if (!is_null($text)) {
if (is_int($text)) {
- $tag = c_theme_html::s_create_tag($this->text_type, NULL, array($this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT), $this->pr_get_text($text, $arguments));
+ $tag = c_theme_html::s_create_tag($this->text_type, NULL, [$this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT], $this->pr_get_text($text, $arguments));
}
else {
- $tag = c_theme_html::s_create_tag($this->text_type, NULL, array($this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT), $text);
+ $tag = c_theme_html::s_create_tag($this->text_type, NULL, [$this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT], $text);
}
$block->set_tag($tag);
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_link($text, $tooltip, $destination, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_LINK, static::CSS_AS_LINK);
+ protected function pr_create_tag_link($text, $tooltip, $destination, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_LINK, static::CSS_AS_LINK];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
unset($classes);
if (is_int($text)) {
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_A, NULL, array($this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT), $this->pr_get_text($text, $arguments));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_A, NULL, [$this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT], $this->pr_get_text($text, $arguments));
}
else {
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_A, NULL, array($this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT), $text);
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_A, NULL, [$this->settings['base_css'] . static::CSS_AS_TEXT, static::CSS_AS_TEXT], $text);
}
if (is_array($destination)) {
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_link_block($text, $tooltip, $destination, $description, $arguments = array(), $header = 0, $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_LINK_BLOCK, static::CSS_AS_LINK_BLOCK);
+ protected function pr_create_tag_link_block($text, $tooltip, $destination, $description, $arguments = [], $header = 0, $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_LINK_BLOCK, static::CSS_AS_LINK_BLOCK];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
if (!is_null($text)) {
if ($header < 1) {
- $wrapper = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, array(static::CSS_AS_TEXT, static::CSS_AS_LINK_BLOCK_NAME));
+ $wrapper = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, NULL, [static::CSS_AS_TEXT, static::CSS_AS_LINK_BLOCK_NAME]);
}
else {
- $header_classes = array($this->settings['base_css'] . static::CSS_AS_HEADER, static::CSS_AS_HEADER, static::CSS_AS_HEADER . '-' . $header, static::CSS_AS_LINK_BLOCK_NAME);
+ $header_classes = [$this->settings['base_css'] . static::CSS_AS_HEADER, static::CSS_AS_HEADER, static::CSS_AS_HEADER . '-' . $header, static::CSS_AS_LINK_BLOCK_NAME];
if ($header == 1) {
$type = c_base_markup_tag::TYPE_H1;
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_fieldset($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_PARAGRAPH_BLOCK, static::CSS_AS_PARAGRAPH_BLOCK);
+ protected function pr_create_tag_fieldset($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_PARAGRAPH_BLOCK, static::CSS_AS_PARAGRAPH_BLOCK];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
if (!is_null($text)) {
if (is_int($text)) {
- $tag = c_theme_html::s_create_tag($this->text_type, NULL, array($this->settings['base_css'] . static::CSS_AS_FIELD_SET_LEGEND, static::CSS_AS_FIELD_SET_LEGEND), $this->pr_get_text($text, $arguments));
+ $tag = c_theme_html::s_create_tag($this->text_type, NULL, [$this->settings['base_css'] . static::CSS_AS_FIELD_SET_LEGEND, static::CSS_AS_FIELD_SET_LEGEND], $this->pr_get_text($text, $arguments));
}
else {
- $tag = c_theme_html::s_create_tag($this->text_type, NULL, array($this->settings['base_css'] . static::CSS_AS_FIELD_SET_LEGEND, static::CSS_AS_FIELD_SET_LEGEND), $text);
+ $tag = c_theme_html::s_create_tag($this->text_type, NULL, [$this->settings['base_css'] . static::CSS_AS_FIELD_SET_LEGEND, static::CSS_AS_FIELD_SET_LEGEND], $text);
}
$block->set_tag($tag);
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_row($value = NULL, $arguments = array(), $id = NULL, $extra_class = NULL, $row = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_ROW, static::CSS_AS_ROW);
+ protected function pr_create_tag_row($value = NULL, $arguments = [], $id = NULL, $extra_class = NULL, $row = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_ROW, static::CSS_AS_ROW];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_field_row($field_name = NULL, $field_value = NULL, $arguments = array(), $id = NULL, $extra_class = NULL, $row = NULL, $spacer = FALSE) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_FIELD_ROW, static::CSS_AS_FIELD_ROW);
+ protected function pr_create_tag_field_row($field_name = NULL, $field_value = NULL, $arguments = [], $id = NULL, $extra_class = NULL, $row = NULL, $spacer = FALSE) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_FIELD_ROW, static::CSS_AS_FIELD_ROW];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_table($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE, static::CSS_AS_TABLE);
+ protected function pr_create_tag_table($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE, static::CSS_AS_TABLE];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
if (!is_null($text)) {
if (is_int($text)) {
- $tag_text = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_CAPTION, NULL, array($this->settings['base_css'] . static::CSS_AS_TABLE_CAPTION, static::CSS_AS_TABLE_CAPTION), $this->pr_get_text($text, $arguments));
+ $tag_text = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_CAPTION, NULL, [$this->settings['base_css'] . static::CSS_AS_TABLE_CAPTION, static::CSS_AS_TABLE_CAPTION], $this->pr_get_text($text, $arguments));
}
else {
- $tag_text = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_CAPTION, NULL, array($this->settings['base_css'] . static::CSS_AS_TABLE_CAPTION, static::CSS_AS_TABLE_CAPTION), $text);
+ $tag_text = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_CAPTION, NULL, [$this->settings['base_css'] . static::CSS_AS_TABLE_CAPTION, static::CSS_AS_TABLE_CAPTION], $text);
}
$tag->set_tag($tag_text);
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_table_caption($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_CAPTION, static::CSS_AS_TABLE_CAPTION);
+ protected function pr_create_tag_table_caption($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_CAPTION, static::CSS_AS_TABLE_CAPTION];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_table_column($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_COLUMN, static::CSS_AS_TABLE_COLUMN);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_COLUMN, static::CSS_AS_TABLE_COLUMN];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_table_column_group($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_COLUMN_GROUP, static::CSS_AS_TABLE_COLUMN_GROUP);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_COLUMN_GROUP, static::CSS_AS_TABLE_COLUMN_GROUP];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_table_header($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_HEADER, static::CSS_AS_TABLE_HEADER);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_HEADER, static::CSS_AS_TABLE_HEADER];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_table_header_cell($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_HEADER_CELL, static::CSS_AS_TABLE_HEADER_CELL);
+ protected function pr_create_tag_table_header_cell($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_HEADER_CELL, static::CSS_AS_TABLE_HEADER_CELL];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_table_body($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_BODY, static::CSS_AS_TABLE_BODY);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_BODY, static::CSS_AS_TABLE_BODY];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_table_row($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_ROW, static::CSS_AS_TABLE_ROW);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_ROW, static::CSS_AS_TABLE_ROW];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @return c_base_markup_tag
* The generated markup tag.
*/
- protected function pr_create_tag_table_cell($text, $arguments = array(), $id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_CELL, static::CSS_AS_TABLE_CELL);
+ protected function pr_create_tag_table_cell($text, $arguments = [], $id = NULL, $extra_class = NULL) {
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_CELL, static::CSS_AS_TABLE_CELL];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* The generated markup tag.
*/
protected function pr_create_tag_table_footer($id = NULL, $extra_class = NULL) {
- $classes = array($this->settings['base_css'] . static::CSS_AS_TABLE_FOOTER, static::CSS_AS_TABLE_FOOTER);
+ $classes = [$this->settings['base_css'] . static::CSS_AS_TABLE_FOOTER, static::CSS_AS_TABLE_FOOTER];
if (is_string($extra_class)) {
$classes[] = $extra_class;
}
* @see: self::pr_create_html_add_header_link_shortlink()
* @see: self::pr_create_html_add_header_script()
*/
- protected function pr_create_html($real_page = TRUE, $arguments_title = array(), $arguments_script = array()) {
+ protected function pr_create_html($real_page = TRUE, $arguments_title = [], $arguments_script = []) {
$this->html = new c_base_html();
$this->pr_create_html_add_primary_ids();
*
* @see: self::pr_create_html()
*/
- protected function pr_create_html_add_title($arguments = array()) {
+ protected function pr_create_html_add_title($arguments = []) {
$title = $this->pr_get_text_title($arguments);
if (is_string($title)) {
// assign content http-equiv header tag
- $aliases = array();
+ $aliases = [];
if (!empty($this->languages)) {
// assign the primary language.
$language_aliases = c_base_defaults_global::s_get_languages()::s_get_aliases_by_id(reset($this->languages))->get_value_exact();
*
* @see: self::pr_create_html()
*/
- protected function pr_create_html_add_header_script($arguments = array()) {
+ protected function pr_create_html_add_header_script($arguments = []) {
// provide a custom javascript for detecting if javascript is enabled and storing in a css class name.
$tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SCRIPT, 'f_standard_paths_hmtl_javascript_detection');
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_TYPE, c_base_mime::TYPE_TEXT_JS);
* The markup tag to assign the spacer to.
*/
protected function pr_create_tag_spacer(&$tag) {
- $tag_text = $this->pr_create_tag_text(' ', array(), NULL, static::CSS_AS_SPACER);
+ $tag_text = $this->pr_create_tag_text(' ', [], NULL, static::CSS_AS_SPACER);
$tag->set_tag($tag_text);
unset($tag_text);
}
* A string is returned as the custom title.
* NULL is returned to enforce default title.
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return NULL;
}
* @return string
* A string is returned as the custom text.
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
return '';
}
* Load and save the current preferred language alias.
*/
protected function pr_get_language_alias() {
- $aliases = array();
+ $aliases = [];
if (is_array($this->languages) && !empty($this->languages)) {
$language = reset($this->languages);
* TRUE on success, FALSE otherwise.
*/
protected function pr_process_arguments(&$executed) {
- $this->arguments = array();
+ $this->arguments = [];
return TRUE;
}
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return $this->pr_get_text(0, $arguments);
}
$this->path_user_id = FALSE;
unset($argument);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
unset($argument);
unset($arguments_total);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
}
if ($this->path_user_id === FALSE) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
parent::__construct();
$this->handler = NULL;
- $this->paths = array();
+ $this->paths = [];
$this->http = NULL;
$this->database = NULL;
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
public function do_process_path(&$http, &$database, &$session, $settings) {
// @todo: these parameter errors might need a custom service unavailable and system log support.
if (!($http instanceof c_base_http)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_return('c_base_path_executed', $error);
}
if (!($database instanceof c_base_database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_return('c_base_path_executed', $error);
}
if (!($session instanceof c_base_session)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_return('c_base_path_executed', $error);
}
if (!is_array($settings)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'settings', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_return('c_base_path_executed', $error);
}
if (!($session instanceof c_base_session)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'session', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_return('c_base_path_executed', $error);
}
$path_tree = new c_base_path_tree();
$path_tree->set_id_group(0);
- $path_tree->set_items(array());
+ $path_tree->set_items([]);
$path_not_found->set_path_tree($path_tree);
unset($path_tree);
}
}
else {
- $path_tree->set_items(array());
+ $path_tree->set_items([]);
$handler_settings_index = $this->paths->find_path('')->get_value();
if (isset($handler_settings_index['handler'])) {
$path_tree->set_items($handler_settings['path_tree']);
}
else {
- $path_tree->set_items(array());
+ $path_tree->set_items([]);
}
if (isset($handler_settings['id_group'])) {
$options_method_path->set_allowed_methods($handler_settings['methods']);
}
else {
- $options_method_path->set_allowed_methods(array());
+ $options_method_path->set_allowed_methods([]);
}
$options_method_path->set_path_tree($path_tree);
* Load and save the current preferred language alias.
*/
protected function pr_get_language_alias() {
- $aliases = array();
+ $aliases = [];
$languages = $this->http->get_response_content_language()->get_value_exact();
if (is_array($languages) && !empty($languages)) {
$language = reset($languages);
* @see: t_base_return_value_exact::p_s_value_exact()
*/
public static function s_value_exact($return) {
- return self::p_s_value_exact($return, __CLASS__, array());
+ return self::p_s_value_exact($return, __CLASS__, []);
}
/**
*/
public function do_load(&$database, $user_name_or_id = NULL, $administrative = FALSE) {
if (!($database instanceof c_base_database)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'database', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($user_name_or_id) && !is_int($user_name_or_id) && $user_name_or_id !== TRUE && !is_string($user_name_or_id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'user_name_or_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'user_name_or_id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($administrative)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'administrative', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'administrative', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$query_string = 'select id, id_external, id_sort, name_machine, name_human, address_email, is_public, is_system, is_requester, is_drafter, is_editor, is_reviewer, is_insurer, is_financer, is_publisher, is_auditor, is_manager, is_administer, is_private, is_locked, is_deleted, is_roler, date_created, date_changed, date_synced, date_locked, date_deleted, image_original, image_cropped, image_icon, settings ';
- $query_arguments = array();
+ $query_arguments = [];
if (is_null($user_name_or_id)) {
$query_string .= 'from v_users_self';
$last_error = $database->get_last_error()->get_value_exact();
if (!empty($last_error)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_ERROR);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_ERROR);
$false->set_error($error);
unset($error);
}
$this->settings = json_decode($columns[30], TRUE);
}
else {
- $this->settings = array();
+ $this->settings = [];
}
}
else {
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return $this->pr_get_text(0, $arguments);
}
/**
* Implements pr_get_text_breadcrumbs().
*/
- protected function pr_get_text_breadcrumbs($code, $arguments = array()) {
+ protected function pr_get_text_breadcrumbs($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// @todo: This needs to return the HTTP invalid method response status.
// the parent function performs validation on the parameters.
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return $this->pr_get_text(0, $arguments);
}
/**
* Implements pr_get_text_breadcrumbs().
*/
- protected function pr_get_text_breadcrumbs($code, $arguments = array()) {
+ protected function pr_get_text_breadcrumbs($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return $this->pr_get_text(0, $arguments);
}
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return $this->pr_get_text(0, $arguments);
}
/**
* Implements pr_get_text_breadcrumbs().
*/
- protected function pr_get_text_breadcrumbs($code, $arguments = array()) {
+ protected function pr_get_text_breadcrumbs($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
return '';
}
}
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return $this->pr_get_text(0, $arguments);
}
/**
* Implements pr_get_text_breadcrumbs().
*/
- protected function pr_get_text_breadcrumbs($code, $arguments = array()) {
+ protected function pr_get_text_breadcrumbs($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
switch ($code) {
case 0:
$string = 'Administration Dashboard';
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
switch ($code) {
case 0:
$string = 'Management Dashboard';
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
return '';
}
}
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
$roles = new c_base_users_user();
}
- $wrapper->set_tag($this->pr_create_tag_text_block($this->pr_get_text(2, array('@{user}' => $session->get_name()->get_value_exact()))));
+ $wrapper->set_tag($this->pr_create_tag_text_block($this->pr_get_text(2, ['@{user}' => $session->get_name()->get_value_exact()])));
$block = $this->pr_create_tag_text_block(NULL);
$block->set_tag($this->pr_create_tag_text(3));
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// Content
$wrapper = $this->pr_create_tag_section(array(1 => 3));
- $wrapper->set_tag($this->pr_create_tag_text_block(4, array('@{user}' => $session->get_name()->get_value_exact())));
+ $wrapper->set_tag($this->pr_create_tag_text_block(4, ['@{user}' => $session->get_name()->get_value_exact()]));
$wrapper->set_tag($this->pr_create_tag_break());
// handle any resulting errors.
- $problem_fields = array();
- $problem_messages = array();
+ $problem_fields = [];
+ $problem_messages = [];
// perform login if session information is provided.
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') {
unset($login_result);
if (!empty($problem_messages)) {
- $messages = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, 'form_problems', array('form_problems'));
+ $messages = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, 'form_problems', ['form_problems']);
foreach ($problem_messages as $problem_delta => $problem_message) {
- $class = array(
+ $class = [
'form_problems-problem',
'form_problems-problem-' . $problem_delta,
- );
+ ];
$tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, 'form_problems-problem-' . $problem_delta, $class);
$tag->set_text($problem_message);
unset($problem_messages);
}
else {
- $form_defaults = array();
+ $form_defaults = [];
}
unset($logged_in);
// login form
- $form = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_FORM, 'login_form', array('login_form'));
+ $form = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_FORM, 'login_form', ['login_form']);
$form->set_attribute(c_base_markup_attributes::ATTRIBUTE_METHOD, 'post');
$form->set_attribute(c_base_markup_attributes::ATTRIBUTE_ROLE, 'form');
$form->set_attribute(c_base_markup_attributes::ATTRIBUTE_ACCEPT_CHARACTER_SET, c_base_charset::UTF_8);
// form id: represents the form.
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_HIDDEN, 'form_id', array('form-id', 'login_form-id'));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_HIDDEN, 'form_id', ['form-id', 'login_form-id']);
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_VALUE, 'login_form');
$form->set_tag($tag);
unset($tag);
// form unique id: uniquely identifies the form.
$unique_id = mt_rand(1, 16);
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_HIDDEN, 'form_id-unique', array('form-id_unique', 'login_form-id_unique'));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_HIDDEN, 'form_id-unique', ['form-id_unique', 'login_form-id_unique']);
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_VALUE, '' . $unique_id);
$form->set_tag($tag);
unset($tag);
// label: username
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LABEL, NULL, array('login_form-label-user_name'));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LABEL, NULL, ['login_form-label-user_name']);
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_FOR, 'login_form-user_name');
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_CLASS, 'field-label-user_name');
$tag->set_text($this->pr_get_text(1));
// field: username
- $class = array(
+ $class = [
'login_form-input-user_name',
- );
+ ];
if (array_key_exists('login_form-user_name', $problem_fields)) {
$class[] = 'field_has_problem';
}
// label: password
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LABEL, NULL, array('login_form-label-password'));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_LABEL, NULL, ['login_form-label-password']);
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_FOR, 'login_form-password');
$tag->set_text($this->pr_get_text(2));
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_CLASS, 'field-label-password');
// field: password
- $class = array(
+ $class = [
'login_form-input-password',
- );
+ ];
if (array_key_exists('login_form-password', $problem_fields)) {
$class[] = 'field_has_problem';
}
// button: reset
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_RESET, 'login_form-reset', array('login_form-button-reset'));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_RESET, 'login_form-reset', ['login_form-button-reset']);
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_VALUE, $this->pr_get_text(11));
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_CLASS, 'field-button-reset');
$form->set_tag($tag);
// button: submit
- $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SUBMIT, 'login_form-login', array('login_form-button-login'));
+ $tag = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_SUBMIT, 'login_form-login', ['login_form-button-login']);
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_VALUE, $this->pr_get_text(12));
#$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_ACTION, $settings['base_path'] . 's/u/login'); // custom submit destination, but would require /s/u/login to redirect back to here.
$tag->set_attribute(c_base_markup_attributes::ATTRIBUTE_CLASS, 'field-button-submit');
* An array of problems on failure.
*/
protected function pr_do_login(&$http, &$database, &$session, $settings) {
- $problems = array();
+ $problems = [];
if (empty($_POST['login_form-user_name']) || !is_string($_POST['login_form-user_name'])) {
$problems[] = c_base_form_problem::s_create_error('login_form-user_name', self::pr_get_text(10));
}
$access_denied = FALSE;
- $error_messages = array();
+ $error_messages = [];
$connected = $database->do_connect();
if (c_base_return::s_has_error($connected)) {
c_standard_index::s_do_initialize_database($database);
if ($database instanceof c_standard_database) {
- $database->do_log_user(c_base_log::TYPE_CREATE, c_base_http_status::OK, array('user_name' => $_POST['login_form-user_name']));
+ $database->do_log_user(c_base_log::TYPE_CREATE, c_base_http_status::OK, ['user_name' => $_POST['login_form-user_name']]);
}
}
}
if ($connected instanceof c_base_return_true) {
c_standard_index::s_do_initialize_database($database);
- $result = $database->do_log_user(c_base_log::TYPE_CONNECT, c_base_http_status::FORBIDDEN, array('user_name' => $_POST['login_form-user_name']));
+ $result = $database->do_log_user(c_base_log::TYPE_CONNECT, c_base_http_status::FORBIDDEN, ['user_name' => $_POST['login_form-user_name']]);
$database->do_disconnect();
$connected = new c_base_return_false();
$cookie_login->set_expires($session_expire);
$cookie_login->set_max_age(NULL);
- $data = array(
+ $data = [
'session_id' => $session->get_session_id()->get_value_exact(),
'expire' => gmdate(static::SESSION_DATE_FORMAT, $session_expire), // unnecessary, but provided for debug purposes.
- );
+ ];
$cookie_login->set_value($data);
$session->set_cookie($cookie_login);
// now that any session/cookie information is loaded and processed, log any login connections.
if ($connected instanceof c_base_return_true && $database instanceof c_standard_database) {
- $database->do_log_user(c_base_log::TYPE_CONNECT, c_base_http_status::OK, array('expires' => $session->get_timeout_expire()->get_value_exact()));
+ $database->do_log_user(c_base_log::TYPE_CONNECT, c_base_http_status::OK, ['expires' => $session->get_timeout_expire()->get_value_exact()]);
}
unset($connected);
}
unset($request_uri);
- return array(
+ return [
'scheme' => NULL,
'authority' => NULL,
'path' => $this->settings['base_path'] . c_standard_paths::URI_USER_DASHBOARD,
'url' => TRUE,
'current' => $start,
'invalid' => FALSE,
- );
+ ];
}
/**
* 'data': Any ldap data found for the given user name.
*/
protected function pr_load_ldap_data($settings, $user_name) {
- $return_data = array(
+ $return_data = [
'title' => NULL,
'message' => NULL,
'status' => TRUE,
'data' => NULL,
- );
+ ];
// ldap support is disabled if ldap_server is set to NULL (or is not a string).
$entries = $entries->get_value();
}
else {
- $entries = array();
+ $entries = [];
}
if ($entries['count'] > 0) {
- $return_data['data'] = array(
+ $return_data['data'] = [
'uid' => $user_name,
- );
+ ];
foreach ($settings['ldap_fields'] as $ldap_field) {
$return_data['data'][$ldap_field] = $entries[0][$ldap_field][0];
$socket_error = @socket_last_error();
@socket_clear_error();
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_create', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_create', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
unset($socket);
unset($connected);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_connect', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_connect', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
unset($socket);
unset($connected);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_write', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_write', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
unset($socket);
unset($connected);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_read', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_read', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($this->socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
if (!is_string($response) || strlen($response) == 0) {
unset($response);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_read', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_read', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_false($error);
}
$query_result = $database->do_query('select id from v_users_self_exists');
if ($query_result instanceof c_base_database_result) {
if (is_array($ldap)) {
- $query_arguments = array();
+ $query_arguments = [];
$email = explode('@', $ldap['data']['mail']);
if (count($email) != 2) {
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return self::pr_get_text(0, $arguments);
}
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return $this->pr_get_text(0, $arguments);
}
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text_title().
*/
- protected function pr_get_text_title($arguments = array()) {
+ protected function pr_get_text_title($arguments = []) {
return '';
}
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
return '';
}
}
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
protected function pr_do_execute_settings(&$executed) {
$errors = NULL;
- $arguments = array();
+ $arguments = [];
$arguments[':{user_name}'] = $this->path_user->get_name_human()->get_first()->get_value_exact() . ' ' . $this->path_user->get_name_human()->get_last()->get_value_exact();
if (mb_strlen($arguments[':{user_name}']) == 0) {
unset($arguments[':{user_name}']);
}
if (is_int($this->path_user_id)) {
- $text_id_user = $this->pr_create_tag_text('[id: ' . $this->path_user_id . ']', array(), NULL, static::CLASS_ID_USER);
- $wrapper = $this->pr_create_tag_section(array(1 => array('text' => 0, 'append-inside' => $text_id_user)), $arguments);
+ $text_id_user = $this->pr_create_tag_text('[id: ' . $this->path_user_id . ']', [], NULL, static::CLASS_ID_USER);
+ $wrapper = $this->pr_create_tag_section([1 => ['text' => 0, 'append-inside' => $text_id_user]], $arguments);
unset($text_id_user);
}
else {
- $wrapper = $this->pr_create_tag_section(array(1 => 0), $arguments);
+ $wrapper = $this->pr_create_tag_section([1 => 0], $arguments);
}
$roles_current = $this->session->get_user_current()->get_roles()->get_value_exact();
// account information
- $fieldset = $this->pr_create_tag_fieldset(14, array(), static::CLASS_USER_SETTINGS_ACCOUNT, static::CLASS_USER_SETTINGS_ACCOUNT);
- $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, array(static::CSS_AS_FIELD_SET_CONTENT));
+ $fieldset = $this->pr_create_tag_fieldset(14, [], static::CLASS_USER_SETTINGS_ACCOUNT, static::CLASS_USER_SETTINGS_ACCOUNT);
+ $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, [static::CSS_AS_FIELD_SET_CONTENT]);
- $content->set_tag($this->pr_create_tag_field_row(18, '' . $this->path_user_id, array(), NULL, c_standard_path::CSS_AS_ROW_EVEN, 0, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(18, '' . $this->path_user_id, [], NULL, c_standard_path::CSS_AS_ROW_EVEN, 0, TRUE));
if ($full_view_access || !$this->path_user->get_address_email()->is_private()->get_value()) {
$count = 1;
if ($full_view_access) {
- $content->set_tag($this->pr_create_tag_field_row(19, '' . $this->path_user->get_id_external()->get_value(), array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(19, '' . $this->path_user->get_id_external()->get_value(), [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
}
- $content->set_tag($this->pr_create_tag_field_row(20, '' . $this->path_user->get_name_machine()->get_value(), array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(20, '' . $this->path_user->get_name_machine()->get_value(), [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
- $content->set_tag($this->pr_create_tag_field_row(21, '' . $this->path_user->get_address_email()->get_address()->get_value(), array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(21, '' . $this->path_user->get_address_email()->get_address()->get_value(), [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
if ($this->path_user->is_locked()->get_value_exact()) {
else {
$tag_text = $this->pr_get_text(34);
}
- $content->set_tag($this->pr_create_tag_field_row(24, $tag_text, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(24, $tag_text, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
if ($this->path_user->is_private()->get_value_exact()) {
else {
$tag_text = $this->pr_get_text(34);
}
- $content->set_tag($this->pr_create_tag_field_row(27, $tag_text, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(27, $tag_text, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
if ($this->path_user->is_roler()->get_value_exact()) {
else {
$tag_text = $this->pr_get_text(34);
}
- $content->set_tag($this->pr_create_tag_field_row(23, $tag_text, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(23, $tag_text, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
if (isset($roles_current[c_base_roles::MANAGER]) || isset($roles_current[c_base_roles::ADMINISTER])) {
else {
$tag_text = $this->pr_get_text(34);
}
- $content->set_tag($this->pr_create_tag_field_row(25, $tag_text, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(25, $tag_text, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
}
$date = c_base_defaults_global::s_get_date(c_base_defaults_global::FORMAT_DATE_TIME_SECONDS_HUMAN, $this->path_user->get_date_created()->get_value())->get_value_exact();
}
- $content->set_tag($this->pr_create_tag_field_row(28, $date, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(28, $date, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
$date = c_base_defaults_global::s_get_date(c_base_defaults_global::FORMAT_DATE_TIME_SECONDS_HUMAN, $this->path_user->get_date_changed()->get_value())->get_value_exact();
}
- $content->set_tag($this->pr_create_tag_field_row(29, $date, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(29, $date, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
$date = c_base_defaults_global::s_get_date(c_base_defaults_global::FORMAT_DATE_TIME_SECONDS_HUMAN, $this->path_user->get_date_synced()->get_value())->get_value_exact();
}
- $content->set_tag($this->pr_create_tag_field_row(30, $date, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(30, $date, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
$date = c_base_defaults_global::s_get_date(c_base_defaults_global::FORMAT_DATE_TIME_SECONDS_HUMAN, $this->path_user->get_date_locked()->get_value())->get_value_exact();
}
- $content->set_tag($this->pr_create_tag_field_row(31, '' . $date, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(31, '' . $date, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
$date = c_base_defaults_global::s_get_date(c_base_defaults_global::FORMAT_DATE_TIME_SECONDS_HUMAN, $this->path_user->get_date_deleted()->get_value())->get_value_exact();
}
- $content->set_tag($this->pr_create_tag_field_row(32, '' . $date, array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(32, '' . $date, [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
}
unset($date);
}
else {
- $content->set_tag($this->pr_create_tag_field_row(20, '' . $this->path_user->get_name_machine()->get_value(), array(), NULL, c_standard_path::CSS_AS_ROW_ODD, 1, TRUE));
- $content->set_tag($this->pr_create_tag_field_row(21, $this->pr_get_text(43), array(), NULL, c_standard_path::CSS_AS_ROW_EVEN, 2, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(20, '' . $this->path_user->get_name_machine()->get_value(), [], NULL, c_standard_path::CSS_AS_ROW_ODD, 1, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(21, $this->pr_get_text(43), [], NULL, c_standard_path::CSS_AS_ROW_EVEN, 2, TRUE));
}
$fieldset->set_tag($content);
if ($full_view_access || !$this->path_user->is_private()->get_value()) {
// personal information
- $fieldset = $this->pr_create_tag_fieldset(15, array(), static::CLASS_USER_SETTINGS_PERSONAL, static::CLASS_USER_SETTINGS_PERSONAL);
- $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, array(static::CSS_AS_FIELD_SET_CONTENT));
+ $fieldset = $this->pr_create_tag_fieldset(15, [], static::CLASS_USER_SETTINGS_PERSONAL, static::CLASS_USER_SETTINGS_PERSONAL);
+ $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, [static::CSS_AS_FIELD_SET_CONTENT]);
- $content->set_tag($this->pr_create_tag_field_row(37, '' . $this->path_user->get_name_human()->get_prefix()->get_value(), array(), NULL, c_standard_path::CSS_AS_ROW_EVEN, 0, TRUE));
- $content->set_tag($this->pr_create_tag_field_row(38, '' . $this->path_user->get_name_human()->get_first()->get_value(), array(), NULL, c_standard_path::CSS_AS_ROW_ODD, 1, TRUE));
- $content->set_tag($this->pr_create_tag_field_row(39, '' . $this->path_user->get_name_human()->get_middle()->get_value(), array(), NULL, c_standard_path::CSS_AS_ROW_EVEN, 2, TRUE));
- $content->set_tag($this->pr_create_tag_field_row(40, '' . $this->path_user->get_name_human()->get_last()->get_value(), array(), NULL, c_standard_path::CSS_AS_ROW_ODD, 3, TRUE));
- $content->set_tag($this->pr_create_tag_field_row(41, '' . $this->path_user->get_name_human()->get_suffix()->get_value(), array(), NULL, c_standard_path::CSS_AS_ROW_EVEN, 4, TRUE));
- $content->set_tag($this->pr_create_tag_field_row(42, '' . $this->path_user->get_name_human()->get_complete()->get_value(), array(), NULL, c_standard_path::CSS_AS_ROW_ODD, 5, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(37, '' . $this->path_user->get_name_human()->get_prefix()->get_value(), [], NULL, c_standard_path::CSS_AS_ROW_EVEN, 0, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(38, '' . $this->path_user->get_name_human()->get_first()->get_value(), [], NULL, c_standard_path::CSS_AS_ROW_ODD, 1, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(39, '' . $this->path_user->get_name_human()->get_middle()->get_value(), [], NULL, c_standard_path::CSS_AS_ROW_EVEN, 2, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(40, '' . $this->path_user->get_name_human()->get_last()->get_value(), [], NULL, c_standard_path::CSS_AS_ROW_ODD, 3, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(41, '' . $this->path_user->get_name_human()->get_suffix()->get_value(), [], NULL, c_standard_path::CSS_AS_ROW_EVEN, 4, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row(42, '' . $this->path_user->get_name_human()->get_complete()->get_value(), [], NULL, c_standard_path::CSS_AS_ROW_ODD, 5, TRUE));
$fieldset->set_tag($content);
unset($content);
// access information
- $fieldset = $this->pr_create_tag_fieldset(16, array(), static::CLASS_USER_SETTINGS_ACCESS, static::CLASS_USER_SETTINGS_ACCESS);
- $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, array(static::CSS_AS_FIELD_SET_CONTENT));
+ $fieldset = $this->pr_create_tag_fieldset(16, [], static::CLASS_USER_SETTINGS_ACCESS, static::CLASS_USER_SETTINGS_ACCESS);
+ $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, [static::CSS_AS_FIELD_SET_CONTENT]);
- $access_to_text_mapping = array(
+ $access_to_text_mapping = [
c_base_roles::PUBLIC => 1,
c_base_roles::SYSTEM => 2,
c_base_roles::USER => 3,
c_base_roles::AUDITOR => 11,
c_base_roles::MANAGER => 12,
c_base_roles::ADMINISTER => 13,
- );
+ ];
$id_text = NULL;
$count = 0;
continue;
}
- $content->set_tag($this->pr_create_tag_field_row($access_to_text_mapping[$role], array(), NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
+ $content->set_tag($this->pr_create_tag_field_row($access_to_text_mapping[$role], [], NULL, ($count % 2 == 0 ? c_standard_path::CSS_AS_ROW_EVEN : c_standard_path::CSS_AS_ROW_ODD), $count, TRUE));
$count++;
}
// history information
- $fieldset = $this->pr_create_tag_fieldset(17, array(), static::CLASS_USER_SETTINGS_HISTORY, static::CLASS_USER_SETTINGS_HISTORY);
- $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, array(static::CSS_AS_FIELD_SET_CONTENT));
+ $fieldset = $this->pr_create_tag_fieldset(17, [], static::CLASS_USER_SETTINGS_HISTORY, static::CLASS_USER_SETTINGS_HISTORY);
+ $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, [static::CSS_AS_FIELD_SET_CONTENT]);
// user history
// @todo: implement code for processing and generating a table/list of history, with the ability to navigate additional entries.
if (c_base_return::s_has_error($query_result)) {
if (is_null($errors)) {
- $errors = array();
+ $errors = [];
}
c_base_return::s_copy_errors($query_result->get_error(), $errors);
$last_error = $this->database->get_last_error()->get_value_exact();
if (!empty($last_error)) {
- $errors[] = c_base_error::s_log(NULL, array('arguments' => array(':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_ERROR);
+ $errors[] = c_base_error::s_log(NULL, ['arguments' => [':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_ERROR);
}
unset($last_error);
}
if (c_base_return::s_has_error($query_result)) {
if (is_null($errors)) {
- $errors = array();
+ $errors = [];
}
c_base_return::s_copy_errors($query_result->get_error(), $errors);
$last_error = $this->database->get_last_error()->get_value_exact();
if (!empty($last_error)) {
- $errors[] = c_base_error::s_log(NULL, array('arguments' => array(':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::POSTGRESQL_ERROR);
+ $errors[] = c_base_error::s_log(NULL, ['arguments' => [':{database_error_message}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_ERROR);
}
unset($last_error);
}
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
#$roles_current = $user->get_roles()->get_value_exact();
// @todo: this function is currently disabled, so return a path not found.
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
/**
* Implements do_execute().
*/
- public function do_execute(&$http, &$database, &$session, $settings = array()) {
+ public function do_execute(&$http, &$database, &$session, $settings = []) {
// the parent function performs validation on the parameters.
$executed = parent::do_execute($http, $database, $session, $settings);
if (c_base_return::s_has_error($executed)) {
// only support HTML output unless otherwise needed.
// @todo: eventually all HTML output will be expected to support at least print and PDF formats (with print being the string 'print').
if ($this->output_format !== c_base_mime::TYPE_TEXT_HTML) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
/**
* Implements pr_get_text().
*/
- protected function pr_get_text($code, $arguments = array()) {
+ protected function pr_get_text($code, $arguments = []) {
$string = '';
switch ($code) {
case 0:
protected function pr_do_execute_view(&$executed) {
$errors = NULL;
- $arguments = array();
+ $arguments = [];
$arguments[':{user_name}'] = $this->path_user->get_name_human()->get_first()->get_value_exact() . ' ' . $this->path_user->get_name_human()->get_last()->get_value_exact();
if (mb_strlen($arguments[':{user_name}']) == 0) {
unset($arguments[':{user_name}']);
unset($is_private);
unset($full_view_access);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::NOT_FOUND_PATH);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{path_name}' => static::PATH_SELF . '/' . implode('/', $this->arguments), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::NOT_FOUND_PATH);
$executed->set_error($error);
unset($error);
$this->pr_create_html(TRUE, $arguments);
if (is_int($this->path_user_id)) {
- $text_id_user = $this->pr_create_tag_text('[id: ' . $this->path_user_id . ']', array(), NULL, static::CLASS_ID_USER);
- $wrapper = $this->pr_create_tag_section(array(1 => array('text' => 0, 'append-inside' => $text_id_user)), $arguments);
+ $text_id_user = $this->pr_create_tag_text('[id: ' . $this->path_user_id . ']', [], NULL, static::CLASS_ID_USER);
+ $wrapper = $this->pr_create_tag_section([1 => ['text' => 0, 'append-inside' => $text_id_user]], $arguments);
unset($text_id_user);
}
else {
- $wrapper = $this->pr_create_tag_section(array(1 => 0), $arguments);
+ $wrapper = $this->pr_create_tag_section([1 => 0], $arguments);
}
$this->html->set_tag($wrapper);
// profile picture
- $fieldset = $this->pr_create_tag_fieldset(1, array(), static::CLASS_USER_VIEW_IMAGE, static::CLASS_USER_VIEW_IMAGE);
+ $fieldset = $this->pr_create_tag_fieldset(1, [], static::CLASS_USER_VIEW_IMAGE, static::CLASS_USER_VIEW_IMAGE);
- $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, array(static::CSS_AS_FIELD_SET_CONTENT));
+ $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, [static::CSS_AS_FIELD_SET_CONTENT]);
$image = $this->path_user->get_image_cropped()->get_value();
if (is_int($image)) {
// account information
- $fieldset = $this->pr_create_tag_fieldset(2, array(), static::CLASS_USER_VIEW_INFORMATION, static::CLASS_USER_VIEW_INFORMATION);
- $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, array(static::CSS_AS_FIELD_SET_CONTENT));
+ $fieldset = $this->pr_create_tag_fieldset(2, [], static::CLASS_USER_VIEW_INFORMATION, static::CLASS_USER_VIEW_INFORMATION);
+ $content = c_theme_html::s_create_tag(c_base_markup_tag::TYPE_DIVIDER, static::CSS_AS_FIELD_SET_CONTENT, [static::CSS_AS_FIELD_SET_CONTENT]);
// @todo: implement basic user profile information.
$tag = c_theme_html::s_create_tag_text(c_base_markup_tag::TYPE_SPAN, $this->path_user->get_name_human()->get_first()->get_value() . ' ' . $this->path_user->get_name_human()->get_last()->get_value());
*/
public function change_element($element, $type) {
if (!($element instanceof DOMNode)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'element', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'element', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($type) || empty($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function change_elements($type_old, $type_new) {
if (!is_string($type_old) || strlen($type_old) == 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type_old', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type_old', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_string($type_new) || strlen($type_empty) == 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type_empty', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type_empty', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!($this->content instanceof DOMNode)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
*/
public function remove_element($element, $preserve_children = TRUE) {
if (!($element instanceof DOMNode)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'element', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'element', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($preserve_children)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'preserve_children', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'preserve_children', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function remove_elements($type, $preserve_children = TRUE) {
if (!is_string($type) || strlen($type) == 0) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_bool($preserve_children)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'preserve_children', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'preserve_children', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!($this->content instanceof DOMNode)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->content', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
}
if ($preserve_children && $element->hasChildNodes()) {
- $children = array();
+ $children = [];
foreach ($element->childNodes as $child) {
$children[] = $child;
public function __construct() {
parent::__construct();
- $this->attributes = array();
+ $this->attributes = [];
}
/**
*/
public function get_attributes() {
if (!isset($this->attributes) && !is_array($this->attributes)) {
- $this->attributes = array();
+ $this->attributes = [];
}
return new c_base_return_array($this->attributes);
}
if (!isset($this->attributes) && !is_array($this->attributes)) {
- $this->attributes = array();
+ $this->attributes = [];
}
if (array_key_exists($attribute, $this->attributes)) {
*/
public static function s_create_tag($type, $id = NULL, $classes = NULL, $text = NULL) {
if (!is_null($id) && !is_string($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_int($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($classes) && !is_array($classes)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'classes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'classes', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_null($text) && !is_string($text)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'text', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
$result = $tag->set_type($type);
if ($result instanceof c_base_return_false) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_html($html) {
if (!($html instanceof c_base_html)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'html', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'html', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function render_markup() {
if (!($this->html instanceof c_base_html)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{variable_name}' => 'this->html', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_VARIABLE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{variable_name}' => 'this->html', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_VARIABLE);
return c_base_return_error::s_false($error);
}
*/
public function set_http($http) {
if (!($http instanceof c_base_http)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'http', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_max_recursion_depth($max_recursion_depth) {
if (!is_int($max_recursion_depth)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'max_recursion_depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'max_recursion_depth', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
// attribute: aria-tags
- $attributes = array(
+ $attributes = [
// global tags
c_base_markup_attributes::ATTRIBUTE_ARIA_ATOMIC => 'aria-atomic',
c_base_markup_attributes::ATTRIBUTE_ARIA_BUSY => 'aria-busy',
c_base_markup_attributes::ATTRIBUTE_ARIA_VALUE_MINIMIM => 'aria-valuemin',
c_base_markup_attributes::ATTRIBUTE_ARIA_VALUE_NOW => 'aria-valuenow',
c_base_markup_attributes::ATTRIBUTE_ARIA_VALUE_TEXT => 'aria-valuetext',
- );
+ ];
if (is_null($tag)) {
foreach ($attributes as $attribute_id => $attribute_name) {
private function p_render_markup_attributes_event_handler($tag = NULL) {
$markup = '';
- $attributes = array(
+ $attributes = [
c_base_markup_attributes::ATTRIBUTE_ON_ABORT => 'onabort',
c_base_markup_attributes::ATTRIBUTE_ON_BLUR => 'onblur',
c_base_markup_attributes::ATTRIBUTE_ON_CANCEL => 'oncancel',
c_base_markup_attributes::ATTRIBUTE_ON_TOGGLE => 'ontoggle',
c_base_markup_attributes::ATTRIBUTE_ON_VOLUME_CHANGE => 'onvolumechange',
c_base_markup_attributes::ATTRIBUTE_ON_WAITING => 'onwaiting',
- );
+ ];
if (is_null($tag)) {
foreach ($attributes as $attribute_id => $attribute_name) {
}
unset($attribute);
- $attributes = array(
+ $attributes = [
c_base_markup_attributes::ATTRIBUTE_ON_ABORT => 'onabort',
c_base_markup_attributes::ATTRIBUTE_ON_BLUR => 'onblur',
c_base_markup_attributes::ATTRIBUTE_ON_CANCEL => 'oncancel',
c_base_markup_attributes::ATTRIBUTE_ON_TOGGLE => 'ontoggle',
c_base_markup_attributes::ATTRIBUTE_ON_VOLUME_CHANGE => 'onvolumechange',
c_base_markup_attributes::ATTRIBUTE_ON_WAITING => 'onwaiting',
- );
+ ];
foreach ($attributes as $attribute_id => $attribute_name) {
$attribute = $this->html->get_attribute_body($attribute_id)->get_value_exact();
*/
public function __construct() {
$this->text = NULL;
- $this->attributes = array();
+ $this->attributes = [];
$this->attributes_length = 0;
- $this->tags = array();
+ $this->tags = [];
$this->tags_length = NULL;
$this->type = static::TYPE_NONE;
return new c_base_return_true();
}
elseif ($type === static::TYPE_NONE) {
- $new_attributes = array();
+ $new_attributes = [];
}
elseif ($type === static::TYPE_TITLE) {
- $new_attributes = array();
+ $new_attributes = [];
if (array_key_exists('id', $this->attributes)) {
$new_attributes['id'] = $this->attributes['id'];
}
}
elseif ($type === static::TYPE_HEADING) {
- $new_attributes = array();
+ $new_attributes = [];
if (array_key_exists('id', $this->attributes)) {
$new_attributes['id'] = $this->attributes['id'];
}
}
elseif ($type === static::TYPE_FILES) {
- $new_attributes = array();
+ $new_attributes = [];
if (array_key_exists('id', $this->attributes)) {
$new_attributes['id'] = $this->attributes['id'];
}
}
elseif ($type === static::TYPE_CONTEXT) {
- $new_attributes = array();
+ $new_attributes = [];
if (array_key_exists('id', $this->attributes)) {
$new_attributes['id'] = $this->attributes['id'];
}
}
elseif ($type === static::TYPE_PRESENTATION) {
- $new_attributes = array();
+ $new_attributes = [];
if (array_key_exists('id', $this->attributes)) {
$new_attributes['id'] = $this->attributes['id'];
}
}
elseif ($type === static::TYPE_CONTENT) {
- $new_attributes = array();
+ $new_attributes = [];
if (array_key_exists('id', $this->attributes)) {
$new_attributes['id'] = $this->attributes['id'];
*/
public function delete_attributes() {
unset($this->attributes);
- $this->attributes = array();
+ $this->attributes = [];
$this->attributes_length = 0;
return new c_base_return_true();
unset($count);
if ($deleted == $total) {
- $this->tags = array();
+ $this->tags = [];
$this->tags_length = 0;
}
$this->tags_length = 0;
}
else {
- $tags = array();
+ $tags = [];
$total = 0;
foreach ($tags as $tag) {
if (is_null($tag)) {
* FALSE without error bit set is returned if nothing was done.
* FALSE with error bit set is returned on error.
*/
- public function pull(&$database, $query = NULL, $arguments = array(), $conditions = NULL, $limit = NULL, $offset = NULL, $group_by = NULL, $order_by = NULL) {
+ public function pull(&$database, $query = NULL, $arguments = [], $conditions = NULL, $limit = NULL, $offset = NULL, $group_by = NULL, $order_by = NULL) {
$result = parent::pull($database, $query, $arguments, $conditions, $limit, $offset, $group_by, $order_by);
if (c_base_return::s_has_error($result)) {
return $result;
*/
public function set_id($id) {
if (!is_int($id)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_id_user($id_user) {
if (!is_int($id_user)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'id_user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'id_user', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_title($title) {
if (!is_string($title)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'title', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'title', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_type($type) {
if (!is_string($type)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_type_sub($type_sub) {
if (!is_string($type_sub)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'type_sub', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'type_sub', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_log_severity($log_severity) {
if (!is_int($log_severity)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'log_severity', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'log_severity', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_log_facility($log_facility) {
if (!is_string($log_facility)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'log_facility', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'log_facility', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
if (!is_array($log_details_decoded)) {
unset($log_details_decoded);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'log_details', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'log_details', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_array($log_details)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'log_details', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'log_details', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
}
if (!is_int($date) && !is_float($date)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_request_client($request_client) {
if (!is_string($request_client)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'request_client', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'request_client', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function set_response_code($response_code) {
if (!is_string($response_code)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'response_code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'response_code', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public function get_log_details() {
if (!is_array($this->log_details)) {
- $this->log_details = array();
+ $this->log_details = [];
}
return c_base_return_array::s_new($this->log_details);
$stuff['http']->set_response_content_language();
// test error message handling using english or japanese.
- $supported_languages = array(
+ $supported_languages = [
i_base_languages::ENGLISH_US => '\n_koopa\c_base_error_messages_english',
i_base_languages::ENGLISH => '\n_koopa\c_base_error_messages_english',
i_base_languages::JAPANESE => '\n_koopa\c_base_error_messages_japanese',
- );
+ ];
$stuff['http']->set_response_content_language(i_base_languages::ENGLISH_US);
$stuff['http']->set_response_content_language(i_base_languages::ENGLISH);
unset($language_chosen);
}
- $stuff = array(
- 'resources' => array(
+ $stuff = [
+ 'resources' => [
'time' => microtime(TRUE),
- ),
- );
+ ],
+ ];
function send_prepared_headers($stuff) {
// add headers
print("3) Language Test: <br>");
// disclaimer: I used translate.google.com to generate the languages and provided only the default translation (expect translation errors).
- $test_strings = array(
+ $test_strings = [
i_base_languages::ENGLISH_US => 'This is a test using your browser default language. Currently english (default), spanish, japanese, and russian are tested.',
i_base_languages::ENGLISH => 'This is a test using your browser default language. Currently english (default), spanish, japanese, and russian are tested.',
i_base_languages::JAPANESE => 'これは、ブラウザのデフォルト言語を使用したテストです。 現在、英語(デフォルト)、スペイン語、日本語、ロシア語がテストされています。',
i_base_languages::RUSSIAN => 'Это тест с помощью браузера по умолчанию язык. В настоящее время английский (по умолчанию), испанский, японский и русский тестируются.',
i_base_languages::SPANISH => 'Se trata de una prueba que utiliza el idioma predeterminado de su navegador. Actualmente se ponen a prueba el inglés (predeterminado), el español, el japonés y el ruso.',
- );
+ ];
$language_chosen = i_base_languages::ENGLISH;
$languages_accepted = $stuff['http']->get_request(c_base_http::REQUEST_ACCEPT_LANGUAGE)->get_value();
$session->set_password($_POST['login_password']);
$is_public = FALSE;
- $user_data = array();
+ $user_data = [];
// allow direct login as u_reservation_public and assume/require that the u_reservation_public account already exists.
if ($_POST['login_name'] == 'u_reservation_public') {
set_log_user($database, 'login', NULL, $session_expire);
if ($result instanceof c_base_return_true) {
- $data = array(
+ $data = [
'session_id' => $session->get_session_id()->get_value_exact(),
'expire' => gmdate("D, d-M-Y H:i:s T", $session_expire), // unnecessary, but provided for debug purposes.
- );
+ ];
$cookie->set_value($data);
$stuff['cookie_login']['cookie'] = $cookie;
}
}
// directly check to see if the current user exists in ldap (this is technically not necessary because postgresql will also do this).
- $stuff_stub = array();
+ $stuff_stub = [];
$found_username = ldap_get_user($stuff_stub, $username);
unset($stuff_stub);
$query_string .= 'insert into v_log_users_self_insert (log_title, log_type, log_severity, request_client, response_code, log_details)';
$query_string .= ' values ($1, $2, $3, ($4, $5, $6), $7, $8); ';
- $query_parameters = array();
+ $query_parameters = [];
$query_parameters[3] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0';
$query_parameters[4] = isset($_SERVER['REMOTE_PORT']) ? $_SERVER['REMOTE_PORT'] : 0;
$query_parameters[5] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '' ;
$query_string = '';
$query_string .= 'insert into v_log_user_activity_self_insert (request_path, request_arguments, request_client, response_code) values ($1, $2, ($3, $4, $5), $6); ';
- $query_parameters = array();
+ $query_parameters = [];
$query_parameters[] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
$query_parameters[] = is_array($_GET) && !empty($_GET) ? print_r(array_keys($_GET), TRUE) : '';
$query_parameters[] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '0.0.0.0';
}
function get_user_data(&$database, &$stuff, $user_name, $ldap_data = NULL) {
- $user_data = array();
+ $user_data = [];
$query_result = $database->do_query('select id, id_external, name_machine, name_human, address_email, is_administer, is_manager, is_auditor, is_publisher, is_financer, is_reviewer, is_editor, is_drafter, is_requester, is_system, is_public, is_locked, is_private, date_created, date_changed, date_synced, date_locked, settings from v_users_self');
}
else {
$email = explode('@', $ldap_data['mail']);
- $parameters = array(
+ $parameters = [
$ldap_data['givenname'],
$ldap_data['sn'],
$ldap_data['cn'],
$email[0],
$email[1],
$ldap_data['employeenumber'],
- );
+ ];
$query_result = $database->do_query('insert into v_users_self_insert (name_human.first, name_human.last, name_human.complete, address_email, id_external) values ($1, $2, $3, ($4, $5, TRUE), $6)', $parameters);
if ($query_result instanceof c_base_return_false) {
}
function get_log_activity(&$database) {
- $values = array();
+ $values = [];
$query_result = $database->do_query('select id, request_path, request_date, request_client, response_code from v_log_user_activity_self order by request_date desc limit 20;');
if ($query_result instanceof c_base_database_result) {
}
function get_log_users(&$database) {
- $values = array();
+ $values = [];
$query_result = $database->do_query('select id, log_title, log_type, log_date, request_client, response_code from v_log_users_self order by log_date desc limit 10;');
if ($query_result instanceof c_base_database_result) {
@socket_clear_error();
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_create', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_create', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
@socket_close($socket);
unset($socket);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_connect', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_connect', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
@socket_close($socket);
unset($socket);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_write', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_write', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
@socket_close($socket);
unset($socket);
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'socket_read', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::SOCKET_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'socket_read', ':{socket_error}' => $socket_error, ':{socket_error_message}' => @socket_strerror($socket_error), ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::SOCKET_FAILURE);
unset($socket_error);
return c_base_return_error::s_false($error);
function ldap_get_user(&$stuff, $username) {
$stuff['ldap']['markup'] = '';
- $stuff['ldap']['data'] = array();
+ $stuff['ldap']['data'] = [];
$ldap = new c_base_ldap_get_user();
$ldap->set_name('ldaps://127.0.0.1:1636/');
$base_dn = 'ou=users,ou=People';
$filter = '(uid=' . $username . ')';
- $read = $ldap->do_search($base_dn, $filter, array('mail', 'gecos', 'givenname', 'cn', 'sn', 'employeenumber'));
+ $read = $ldap->do_search($base_dn, $filter, ['mail', 'gecos', 'givenname', 'cn', 'sn', 'employeenumber']);
if (c_base_return::s_has_error($read)) {
$message = $ldap->get_error_message();
if ($message instanceof c_base_return_string) {
$entries = $entries->get_value();
}
else {
- $entries = array();
+ $entries = [];
}
if ($entries['count'] > 0) {
- $entry = array(
+ $entry = [
'uid' => $username,
'mail' => $entries[0]['mail'][0],
'gecos' => $entries[0]['gecos'][0],
'cn' => $entries[0]['cn'][0],
'sn' => $entries[0]['sn'][0],
'employeenumber' => $entries[0]['employeenumber'][0],
- );
+ ];
$stuff['ldap']['data'] = $entry;
$stuff['ldap']['markup'] .= "<ul>\n";
$validated = "Valid";
}
- $stuff['cookie_existence'] = array('exists' => array());
+ $stuff['cookie_existence'] = ['exists' => []];
$stuff['cookie_existence']['exists'] = " - The cookie settings:<br>";
$stuff['cookie_existence']['exists'] .= " -- Name: '" . $cookie->get_name()->get_value_exact() . "'<br>";
$stuff['cookie_existence']['exists'] .= " -- Domain: '" . $cookie->get_domain()->get_value_exact() . "'<br>";
#$max_age_string = c_base_defaults_global::s_get_date("D, d M Y H:i:s T", $cookie->get_max_age()->get_value_exact())->get_value_exact();
$max_age_string = $cookie->get_max_age()->get_value_exact();
- $data = array(
+ $data = [
'message' => "Your agent string is: " . $agent_string,
'expire' => gmdate("D, d-M-Y H:i:s T", $expire_stamp),
- );
+ ];
$cookie->set_value($data);
$cookie->set_expires($expire_stamp);
$checksum = $cookie->build_checksum()->get_value_exact();
- $stuff['cookie_existence'] = array('new' => array());
+ $stuff['cookie_existence'] = ['new' => []];
$stuff['cookie_existence']['new'] = " - The following cookie should be generated:<br>";
$stuff['cookie_existence']['new'] .= " -- Name: '" . $cookie->get_name()->get_value_exact() . "'<br>";
$stuff['cookie_existence']['new'] .= " -- Domain: '" . $cookie->get_domain()->get_value_exact() . "'<br>";
// provide a language to fallback to if none is set.
const LANGUAGE_CLASS_DEFAULT = '\n_koopa\c_base_languages_limited';
- // reserved path groups: array(97, 99, 100, 102, 109, 115, 116, 120, 121).
- const RESERVED_PATH_GROUP = array(c_base_ascii::LOWER_A, c_base_ascii::LOWER_C, c_base_ascii::LOWER_D, c_base_ascii::LOWER_F, c_base_ascii::LOWER_M, c_base_ascii::LOWER_S, c_base_ascii::LOWER_T, c_base_ascii::LOWER_U, c_base_ascii::LOWER_X);
+ // reserved path groups: [97, 99, 100, 102, 109, 115, 116, 120, 121].
+ const RESERVED_PATH_GROUP = [c_base_ascii::LOWER_A, c_base_ascii::LOWER_C, c_base_ascii::LOWER_D, c_base_ascii::LOWER_F, c_base_ascii::LOWER_M, c_base_ascii::LOWER_S, c_base_ascii::LOWER_T, c_base_ascii::LOWER_U, c_base_ascii::LOWER_X];
// default log facility (17 = c_base_error::FACILITY_LOCAL_0).
const LOG_FACILITY = 17;
*/
public static function s_set_timezone($timezone) {
if (!($timezone instanceof i_base_languages)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timezone', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timezone', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_set_languages($languages) {
if (!($languages instanceof i_base_languages)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'languages', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_false($error);
}
*/
public static function s_get_date($string, $timestamp = NULL) {
if (!is_string($string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
if (!is_null($timestamp) && !is_float($timestamp) && !is_int($timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
unset($microseconds);
if (!($date instanceof \DateTime)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
$formatted = $date->format($string);
if (!is_string($formatted)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date->format', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date->format', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value('', 'c_base_return_string', $error);
}
*/
public static function s_get_timestamp($string, $format = 'Y/m/d h:i:s.u P') {
if (!is_string($string)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::INVALID_ARGUMENT);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{argument_name}' => 'string', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::INVALID_ARGUMENT);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
$date = \DateTime::createFromFormat($format, $string);
if (!($date instanceof \DateTime)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}
$resulting_timestamp = $date->getTimestamp();
if (!is_int($resulting_timestamp) && !is_float($resulting_timestamp)) {
- $error = c_base_error::s_log(NULL, array('arguments' => array(':{operation_name}' => 'date->get_timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__)), i_base_error_messages::OPERATION_FAILURE);
+ $error = c_base_error::s_log(NULL, ['arguments' => [':{operation_name}' => 'date->get_timestamp', ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::OPERATION_FAILURE);
return c_base_return_error::s_value(0.0, 'c_base_return_float', $error);
}