WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана


ORM::find_one() public Yoast 1.0

Tells the ORM that you are expecting a single result back from your query, and execute it. Will return a single instance of the ORM class, or false if no rows were returned. As a shortcut, you may supply an ID as a parameter to this method. This will perform a primary key lookup on the table.

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

Хуков нет.




$ORM = new ORM();
$ORM->find_one( $id );
An (optional) ID.
По умолчанию: null

Код ORM::find_one() Yoast 17.1

public function find_one( $id = null ) {
	if ( ! \is_null( $id ) ) {
		$this->where_id_is( $id );
	$this->limit( 1 );
	$rows = $this->run();
	if ( empty( $rows ) ) {
		return false;

	return $this->create_instance_from_row( $rows[0] );