english comments
This commit is contained in:
parent
61e97681b6
commit
fcd11f5475
@ -31,12 +31,23 @@ class JsonDb extends \Prowebcraft\Dot
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reload data from file
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function reload()
|
||||||
|
{
|
||||||
|
$this->loadData(true);
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set value or array of values to path
|
* Set value or array of values to path
|
||||||
*
|
*
|
||||||
* @param mixed $key Path or array of paths and values
|
* @param mixed $key Path or array of paths and values
|
||||||
* @param mixed|null $value Value to set if path is not an array
|
* @param mixed|null $value Value to set if path is not an array
|
||||||
* @param bool $save Сохранить данные в базу
|
* @param bool $save Save data to database
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function set($key, $value = null, $save = true)
|
public function set($key, $value = null, $save = true)
|
||||||
@ -52,7 +63,7 @@ class JsonDb extends \Prowebcraft\Dot
|
|||||||
* @param mixed $key Path or array of paths and values
|
* @param mixed $key Path or array of paths and values
|
||||||
* @param mixed|null $value Value to set if path is not an array
|
* @param mixed|null $value Value to set if path is not an array
|
||||||
* @param boolean $pop Helper to pop out last key if value is an array
|
* @param boolean $pop Helper to pop out last key if value is an array
|
||||||
* @param bool $save Сохранить данные в базу
|
* @param bool $save Save data to database
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function add($key, $value = null, $pop = false, $save = true)
|
public function add($key, $value = null, $pop = false, $save = true)
|
||||||
@ -66,8 +77,8 @@ class JsonDb extends \Prowebcraft\Dot
|
|||||||
* Delete path or array of paths
|
* Delete path or array of paths
|
||||||
*
|
*
|
||||||
* @param mixed $key Path or array of paths to delete
|
* @param mixed $key Path or array of paths to delete
|
||||||
* @param bool $save Сохранить данные в базу
|
* @param bool $save Save data to database
|
||||||
* @return $this
|
* @return $thisurn $this
|
||||||
*/
|
*/
|
||||||
public function delete($key, $save = true)
|
public function delete($key, $save = true)
|
||||||
{
|
{
|
||||||
@ -82,7 +93,7 @@ class JsonDb extends \Prowebcraft\Dot
|
|||||||
*
|
*
|
||||||
* @param mixed|null $key Path or array of paths to clean
|
* @param mixed|null $key Path or array of paths to clean
|
||||||
* @param boolean $format Format option
|
* @param boolean $format Format option
|
||||||
* @param bool $save Сохранить данные в базу
|
* @param bool $save Save data to database
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function clear($key = null, $format = false, $save = true)
|
public function clear($key = null, $format = false, $save = true)
|
||||||
@ -94,9 +105,8 @@ class JsonDb extends \Prowebcraft\Dot
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Загрузка локальной базы данных
|
* Local database upload
|
||||||
* @param bool $reload
|
* @param bool $reload Reboot data?
|
||||||
* Перезагрузить данные?
|
|
||||||
* @return array|mixed|null
|
* @return array|mixed|null
|
||||||
*/
|
*/
|
||||||
protected function loadData($reload = false) {
|
protected function loadData($reload = false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user