Yoast\WP\Lib
ORM::count_null_id_columns
Counts the number of columns that belong to the primary key and their value is null.
Метод класса: ORM{}
Хуков нет.
Возвращает
int. The amount of null columns.
Использование
$ORM = new ORM(); $ORM->count_null_id_columns();
Код ORM::count_null_id_columns() ORM::count null id columns Yoast 26.3
public function count_null_id_columns() {
if ( \is_array( $this->get_id_column_name() ) ) {
return \count( \array_filter( $this->id(), 'is_null' ) );
}
else {
return ( $this->id() === null ) ? 1 : 0;
}
}