super-powers/src/c09e8968-c767-4175-bb3d-843.../code.power

25 lines
449 B
Plaintext

/**
* Check if a path is an array
*
* @param string $path Registry path (e.g. joomla.content.showauthor)
*
* @return bool
* @since 3.2.0
*/
public function isArray(string $path): bool
{
// Check base array if no path is given
if (empty($path))
{
return false;
}
// get the value
if (($node = $this->get($path)) !== null
&& is_array($node))
{
return true;
}
return false;
}