in /home/activitubs/www/wp-content/themes/generatepress_child/vendor/yiisoft/yii2/db/Connection.php at line 695
if ($enableProfiling) { Yii::endProfile($token, __METHOD__); } } catch (\PDOException $e) { if ($enableProfiling) { Yii::endProfile($token, __METHOD__); } throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e); } } /** * Closes the currently active DB connection. * It does nothing if the connection is already closed. */ public function close() {
* Returns the PDO instance for the currently active master connection. * This method will open the master DB connection and then return [[pdo]]. * @return PDO the PDO instance for the currently active master connection. */ public function getMasterPdo() { $this->open(); return $this->pdo; } /** * Returns the currently active slave connection. * If this method is called for the first time, it will try to open a slave connection when [[enableSlaves]] is true.
* is available and `$fallbackToMaster` is false. */ public function getSlavePdo($fallbackToMaster = true) { $db = $this->getSlave(false); if ($db === null) { return $fallbackToMaster ? $this->getMasterPdo() : null; } return $db->pdo; } /**
if ($this->db->getTransaction()) { // master is in a transaction. use the same connection. $forRead = false; } if ($forRead || $forRead === null && $this->db->getSchema()->isReadQuery($sql)) { $pdo = $this->db->getSlavePdo(); } else { $pdo = $this->db->getMasterPdo(); } try { $this->pdoStatement = $pdo->prepare($sql);
Yii::debug('Query result served from cache', 'yii\db\Command::query'); return $result[0]; } } } $this->prepare(true); try { $profile and Yii::beginProfile($rawSql, 'yii\db\Command::query'); $this->internalExecute($rawSql);
* @return array all rows of the query result. Each array element is an array representing a row of data. * An empty array is returned if the query results in nothing. * @throws Exception execution failed */ public function queryAll($fetchMode = null) { return $this->queryInternal('fetchAll', $fetchMode); } /** * Executes the SQL statement and returns the first row of the result. * This method is best used when only the first row of result is needed for a query. * @param int $fetchMode the result fetch mode. Please refer to [PHP manual](https://secure.php.net/manual/en/pdostatement.setfetchmode.php)
* @throws \Exception if DB query fails */ protected function findColumns($table) { $sql = 'SHOW FULL COLUMNS FROM ' . $this->quoteTableName($table->fullName); try { $columns = $this->db->createCommand($sql)->queryAll(); } catch (\Exception $e) { $previous = $e->getPrevious(); if ($previous instanceof \PDOException && strpos($previous->getMessage(), 'SQLSTATE[42S02') !== false) { // table does not exist // https://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html#error_er_bad_table_error return false;
*/ protected function loadTableSchema($name) { $table = new TableSchema(); $this->resolveTableNames($table, $name); if ($this->findColumns($table)) { $this->findConstraints($table); return $table; } return null; }
} $rawName = $this->getRawTableName($name); if (!isset($this->_tableMetadata[$rawName])) { $this->loadTableMetadataFromCache($cache, $rawName); } if ($refresh || !array_key_exists($type, $this->_tableMetadata[$rawName])) { $this->_tableMetadata[$rawName][$type] = $this->{'loadTable' . ucfirst($type)}($rawName); $this->saveTableMetadataToCache($cache, $rawName); } return $this->_tableMetadata[$rawName][$type]; }
* @param string $name table name. The table name may contain schema name if any. Do not quote the table name. * @param bool $refresh whether to reload the table schema even if it is found in the cache. * @return TableSchema|null table metadata. `null` if the named table does not exist. */ public function getTableSchema($name, $refresh = false) { return $this->getTableMetadata($name, 'schema', $refresh); } /** * Returns the metadata for all tables in the database. * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema name. * @param bool $refresh whether to fetch the latest available table schemas. If this is `false`,
* @throws InvalidConfigException if the table for the AR class does not exist. */ public static function getTableSchema() { $tableSchema = static::getDb() ->getSchema() ->getTableSchema(static::tableName()); if ($tableSchema === null) { throw new InvalidConfigException('The table does not exist: ' . static::tableName()); } return $tableSchema;
/** * {@inheritdoc} */ public static function populateRecord($record, $row) { $columns = static::getTableSchema()->columns; foreach ($row as $name => $value) { if (isset($columns[$name])) { $row[$name] = $columns[$name]->phpTypecast($value); } } parent::populateRecord($record, $row);
} else { if ( $this->wp_query->have_posts() ) { while ( $this->wp_query->have_posts() ) { $this->wp_query->the_post(); $data=(array)$this->wp_query->post; $model=WpPostModel::instantiate($data); $model::populateRecord($model, $data); $models[]=$model; } $pagination->totalCount = $this->getTotalCount(); $pagination->setPageSize($this->wp_query->query["posts_per_page"]); /*if(can_debug()){ print_r($this->wp_query);
* * @param bool $forcePrepare whether to force data preparation even if it has been done before. */ public function prepare($forcePrepare = false) { if ($forcePrepare || $this->_models === null) { $this->_models = $this->prepareModels(); } if ($forcePrepare || $this->_keys === null) { $this->_keys = $this->prepareKeys($this->_models); } }
/** * Returns the data models in the current page. * @return array the list of data models in the current page. */ public function getModels() { $this->prepare(); return $this->_models; } /** * Sets the data models in the current page.
/** * Returns the number of data models in the current page. * @return int the number of data models in the current page. */ public function getCount() { return count($this->getModels()); } /** * Returns the total number of data models. * When [[pagination]] is false, this returns the same value as [[count]]. * Otherwise, it will call [[prepareTotalCount()]] to get the count.
/** * Runs the widget. */ public function run() { if ($this->showOnEmpty || $this->dataProvider->getCount() > 0) { $content = preg_replace_callback('/{\\w+}/', function ($matches) { $content = $this->renderSection($matches[0]); return $content === false ? $matches[0] : $content; }, $this->layout); } else {
try { /* @var $widget Widget */ $config['class'] = get_called_class(); $widget = Yii::createObject($config); $out = ''; if ($widget->beforeRun()) { $result = $widget->run(); $out = $widget->afterRun($result); } } catch (\Exception $e) { // close the output buffer opened above if it has not been closed already if (ob_get_level() > 0) { ob_end_clean();
]; if ($settings["portal"] == "activitum") { $args['layout'] = "{items}\n{summary}\n{pager}\n <a class='cargar_mas hidden' href='#' title='Veure més resultats'><span class='eicon-arrow-down'></span></a>"; } echo ListView::widget($args); ?> </div> <?php if ($settings["portal"] == "activitum" && $settings["iframe"] != "yes") { ?> <script>
{ $_obInitialLevel_ = ob_get_level(); ob_start(); ob_implicit_flush(false); extract($_params_, EXTR_OVERWRITE); try { require $_file_; return ob_get_clean(); } catch (\Exception $e) { while (ob_get_level() > $_obInitialLevel_) { if (!@ob_end_clean()) { ob_clean(); }
$this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); } array_pop($this->_viewFiles); $this->context = $oldContext;
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the [path alias](guide:concept-aliases) of the view file. Please refer to [[render()]] * on how to specify this parameter.
* @param array $params the parameters (name-value pairs) that should be made available in the view. * @return string the rendering result. * @throws InvalidArgumentException if the view file does not exist. */ public function renderView($view, $params = []) { return $this->getView()->render($view, $params, $this); } } ?>
$model->otro=$settings["otro"]; echo $this->renderView('actividades/listado',[ 'settings' => $settings, 'model'=>$model, 'dataProvider' => $model->actividades_search($_GET), ]); //$model=$this->getModel(); } }
if ( Plugin::$instance->frontend->is_static_render_mode() ) { $this->render_static(); return; } $this->render(); } /** * Print content template. * * Used to generate the content template on the editor, using a
$skin = $this->get_current_skin(); if ( $skin ) { $skin->set_parent( $this ); $skin->render_by_mode(); } else { $this->render_by_mode(); } $widget_content = ob_get_clean(); if ( empty( $widget_content ) ) { return;
* Output the widget final HTML on the frontend. * * @since 1.0.0 * @access protected */ protected function print_content() { $this->render_content(); } /** * Print a setting content without escaping. * * Script tags are allowed on frontend according to the WP theme securing policy.
if ( $this->has_own_method( '_print_content', self::class ) ) { Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( '_print_content', '3.1.0', __CLASS__ . '::print_content()' ); $this->_print_content(); } else { $this->print_content(); } $content = ob_get_clean(); $should_render = ( ! empty( $content ) || $this->should_print_empty() );
* * @since 3.1.0 * @access protected */ protected function print_content() { foreach ( $this->get_children() as $child ) { $child->print_element(); } } /** * Get initial config. *
if ( $this->has_own_method( '_print_content', self::class ) ) { Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( '_print_content', '3.1.0', __CLASS__ . '::print_content()' ); $this->_print_content(); } else { $this->print_content(); } $content = ob_get_clean(); $should_render = ( ! empty( $content ) || $this->should_print_empty() );
* * @since 3.1.0 * @access protected */ protected function print_content() { foreach ( $this->get_children() as $child ) { $child->print_element(); } } /** * Get initial config. *
if ( $this->has_own_method( '_print_content', self::class ) ) { Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( '_print_content', '3.1.0', __CLASS__ . '::print_content()' ); $this->_print_content(); } else { $this->print_content(); } $content = ob_get_clean(); $should_render = ( ! empty( $content ) || $this->should_print_empty() );
$element = Plugin::$instance->elements_manager->create_element_instance( $element_data ); if ( ! $element ) { continue; } $element->print_element(); } } protected function register_document_controls() { $this->start_controls_section( 'document_settings',
?> <div <?php Utils::print_html_attributes( $this->get_container_attributes() ); ?>> <?php if ( ! $is_dom_optimization_active ) : ?> <div class="elementor-inner"> <div class="elementor-section-wrap"> <?php endif; ?> <?php $this->print_elements( $elements_data ); ?> <?php if ( ! $is_dom_optimization_active ) : ?> </div> </div> <?php endif; ?> </div> <?php
$with_css = apply_filters( 'elementor/frontend/builder_content/before_print_css', $with_css ); if ( ! empty( $css_file ) && $with_css ) { $css_file->print_css(); } $document->print_elements_with_wrapper( $data ); $content = ob_get_clean(); $content = $this->process_more_tag( $content ); /**
} // Remove the filter itself in order to allow other `the_content` in the elements $this->remove_content_filter(); $post_id = get_the_ID(); $builder_content = $this->get_builder_content( $post_id ); if ( ! empty( $builder_content ) ) { $content = $builder_content; $this->remove_content_filters(); }
} // Avoid the array_slice() if possible. if ( 0 == $the_['accepted_args'] ) { $value = call_user_func( $the_['function'] ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) );
$wp_current_filter[] = $hook_name; } // Pass the value to WP_Hook. array_unshift( $args, $value ); $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args ); array_pop( $wp_current_filter ); return $filtered; }
* Filters the post content. * * @since 0.71 * * @param string $content Content of the current post. */ $content = apply_filters( 'the_content', $content ); $content = str_replace( ']]>', ']]>', $content ); echo $content; } /** * Retrieves the post content.
$itemprop = ' itemprop="text"'; } ?> <div class="entry-content"<?php echo $itemprop; // phpcs:ignore -- No escaping needed. ?>> <?php the_content(); wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'generatepress' ), 'after' => '</div>', )
*/ do_action( 'wp_before_load_template', $_template_file, $require_once, $args ); if ( $require_once ) { require_once $_template_file; } else { require $_template_file; } /** * Fires after a template file is loaded. * * @since 6.1.0
$located = ABSPATH . WPINC . '/theme-compat/' . $template_name; break; } } if ( $load && '' !== $located ) { load_template( $located, $require_once, $args ); } return $located; } /**
* @param string $name The name of the specialized template. * @param string[] $templates Array of template files to search for, in order. * @param array $args Additional arguments passed to the template. */ do_action( 'get_template_part', $slug, $name, $templates, $args ); if ( ! locate_template( $templates, true, false, $args ) ) { return false; } } /** * Displays search form.
if ( apply_filters( 'generate_do_template_part', true, $template ) ) { if ( 'archive' === $template || 'index' === $template ) { get_template_part( 'content', get_post_format() ); } if ( 'page' === $template ) { get_template_part( 'content', 'page' ); } if ( 'single' === $template ) { get_template_part( 'content', 'single' ); }
if ( generate_has_default_loop() ) { while ( have_posts() ) : the_post(); generate_do_template_part( 'page' ); endwhile; } /** * generate_after_main_content hook.
* @since 3.0.0 * * @param string $template The path of the template to include. */ $template = apply_filters( 'template_include', $template ); if ( $template ) { include $template; } elseif ( current_user_can( 'switch_themes' ) ) { $theme = wp_get_theme(); if ( $theme->errors() ) { wp_die( $theme->errors() ); } }
require_once __DIR__ . '/wp-load.php'; // Set up the WordPress query. wp(); // Load the theme template. require_once ABSPATH . WPINC . '/template-loader.php'; }
* * @var bool */ define( 'WP_USE_THEMES', true ); /** Loads the WordPress Environment and Template */ require __DIR__ . '/wp-blog-header.php';
$_GET = [ 'ActividadesSearch' => [ 'tipo' => 'families', ], 'rand' => '1685290513', ];