芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/public_html/wp-content/plugins/elementor-pro/core/database/model-query-builder.php
set_model( $model_classname ); parent::__construct( $connection ); } /** * Set the model the generated from the query builder. * * @param $model_classname * * @return $this */ public function set_model( $model_classname ) { $this->model = $model_classname; return $this; } /** * Disable model hydration. * * @return $this */ public function disable_model_initiation() { $this->return_as_model = false; return $this; } /** * Disable hydration before calling the original count. * * @param string $column * * @return int */ public function count( $column = '*' ) { $this->disable_model_initiation(); return parent::count( $column ); } /** * Disable hydration before calling the original pluck. * * @inheritDoc */ public function pluck( $column = null ) { $this->disable_model_initiation(); return parent::pluck( $column ); } /** * Override the parent `get()` and make Models from the results. * * @return \ElementorPro\Core\Utils\Collection */ public function get() { $items = parent::get(); if ( ! $this->return_as_model ) { return $items; } // Convert the SQL results to Model instances. return $items->map( function ( $comment ) { return new $this->model( $comment ); } ); } }