Yoast\WP\Lib

ORM::find_many()publicYoast 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{}

Хуков нет.

Возвращает

Массив.

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

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

Код ORM::find_many() Yoast 22.4

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

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

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