$name= path1
$key= key1
public static function getpath($name, $key)
{
if (!self::is_valid($name, $key)) return false;
$path = '/var/lib/fdata/'.$name.'/'.$key;
if (!is_file($path)) return false;
return $path;
}
public static function get($name, $key)
{
$path = self::getpath($name, $key);
if ($path === false) return false;
return file_get_contents($path);
}
$configmap = unserialize(fdata::get('base', 'key'));
The questions is:
- if variable
$path = self::getpath($name, $key);then $path = ? and what meanself:: - if variable
$configmap = unserialize(fdata::get('base', 'key'));then $configmap = ? and what meanfdata::
1)
self::getpath(...)should return a boolean value or a string.self::refers to a current class.2) Here’s the man for
unserialize3)
fdata::denotes the namespace fdata or perhaps a class.