Yoast\WP\Lib
ORM::create_instance_from_row
Creates an ORM instance from the given row (an associative array of data fetched from the database).
Метод класса: ORM{}
Хуков нет.
Возвращает
bool|Model.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->create_instance_from_row( $row );
- $row(массив) (обязательный)
- A row from the database.
Код ORM::create_instance_from_row() ORM::create instance from row Yoast 28.6
protected function create_instance_from_row( $row ) {
$instance = self::for_table( $this->table_name );
$instance->use_id_column( $this->instance_id_column );
$instance->hydrate( $row );
return $this->create_model_instance( $instance );
}