Obj::getKeys() 

\nn\t3::Obj()->getKeys($obj); 

Zugriff auf ALLE Keys, die in einem Object zu holen sind

\nn\t3::Obj()->getKeys( $model );                                    // ['uid', 'title', 'text', ...]
\nn\t3::Obj()->getKeys( $model );                                    // ['uid', 'title', 'text', ...]
\nn\t3::Obj()->getKeys( \Nng\MyExt\Domain\Model\Demo::class );       // ['uid', 'title', 'text', ...]
Copied!
@param mixed $obj Model, Array oder Klassen-Name
@return array

Source Code 

public function getKeys ( $obj )
{
	if (is_string($obj) && class_exists($obj)) {
		$obj = new $obj();
	}
	$keys = [];
	if (is_object($obj)) {
		return ObjectAccess::getGettablePropertyNames($obj);
	} else if (is_array($obj)) {
		return array_keys($obj);
	}
	return [];
}
Copied!