Yoast\WP\Lib

ORM::find_many │ public │ Yoast 1.0

Tells the ORM that you are expecting multiple results from your query, and execute it. Will return an array of instances of the ORM class, or an empty array if no rows were returned.

Метод класса: ORM{}

Хуков нет.

Возвращает

array.

Использование

$ORM = new ORM();
$ORM->find_many();

Код ORM::find_many() Yoast 28.9

public function find_many() {
	$rows = $this->run();

	if ( $rows === false ) {
		return [];
	}

	return \array_map( [ $this, 'create_instance_from_row' ], $rows );
}