in /home/tevmcgorwzzi/public_html/vendor/yiisoft/yii2/db/Connection.php at line 579
in /home/tevmcgorwzzi/public_html/vendor/yiisoft/yii2/db/Connection.php at line 579
$token = 'Opening DB connection: ' . $this->dsn; try { Yii::info($token, __METHOD__); Yii::beginProfile($token, __METHOD__); $this->pdo = $this->createPdoInstance(); $this->initConnection(); Yii::endProfile($token, __METHOD__); } catch (\PDOException $e) { 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 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; } else { 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::trace('Query result served from cache', 'yii\db\Command::query'); return $result; } } } $this->prepare(true); $token = $rawSql; try { Yii::beginProfile($token, 'yii\db\Command::query'); $this->pdoStatement->execute();
* @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 integer $fetchMode the result fetch mode. Please refer to [PHP manual](http://www.php.net/manual/en/function.PDOStatement-setFetchMode.php)
* @param Connection $db the database connection used to generate the SQL statement. * If this parameter is not given, the `db` application component will be used. * @return array the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) { $rows = $this->createCommand($db)->queryAll(); return $this->populate($rows); } /** * Converts the raw query results into the format as specified by this query. * This method is internally used to convert the data fetched from database
* @param Connection $db the DB connection used to create the DB command. * If null, the DB connection returned by [[modelClass]] will be used. * @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null) { return parent::all($db); } /** * @inheritdoc */ public function prepare($builder)
public $css; public $logoProvider; public $attachmentProvider; public function init(){ $backgroundModel = new BackgroundSearch(); $this->backgroundProvider = Background::find()->where('visible=:visible', ['visible'=>1])->orderBy('priority ASC')->all(); $logoModel = new LogoSearch(); $this->logoProvider = Logo::find()->where('visible=:visible', ['visible'=>1])->all(); $attachmentProvider = new AttachmentSearch(); $this->attachmentProvider = Attachment::find()->where('visible=:visible', ['visible'=>1])->all();
*/ public function __construct($config = []) { if (!empty($config)) { Yii::configure($this, $config); } $this->init(); } /** * Initializes the object. * This method is invoked at the end of the constructor after the object is initialized with the * given configuration.
* @param array $config name-value pairs that will be used to initialize the object properties. */ public function __construct($id, $module, $config = []) { $this->id = $id; $this->module = $module; parent::__construct($config); } /** * Declares external actions for the controller. * This method is meant to be overwritten to declare external actions for the controller. * It should return an array, with array keys being action IDs, and array values the corresponding
} if (!empty($dependencies) && is_a($class, 'yii\base\Object', true)) { // set $config as the last parameter (existing one will be overwritten) $dependencies[count($dependencies) - 1] = $config; $dependencies = $this->resolveDependencies($dependencies, $reflection); return $reflection->newInstanceArgs($dependencies); } else { $dependencies = $this->resolveDependencies($dependencies, $reflection); $object = $reflection->newInstanceArgs($dependencies); foreach ($config as $name => $value) { $object->$name = $value; }
public function get($class, $params = [], $config = []) { if (isset($this->_singletons[$class])) { // singleton return $this->_singletons[$class]; } elseif (!isset($this->_definitions[$class])) { return $this->build($class, $params, $config); } $definition = $this->_definitions[$class]; if (is_callable($definition, true)) { $params = $this->resolveDependencies($this->mergeParams($class, $params));
* @throws InvalidConfigException if the configuration is invalid. * @see \yii\di\Container */ public static function createObject($type, array $params = []) { if (is_string($type)) { return static::$container->get($type, $params); } elseif (is_array($type) && isset($type['class'])) { $class = $type['class']; unset($type['class']); return static::$container->get($class, $params, $type); } elseif (is_callable($type, true)) { return call_user_func($type, $params);
$className = ltrim($this->controllerNamespace . '\\' . str_replace('/', '\\', $prefix) . $className, '\\'); if (strpos($className, '-') !== false || !class_exists($className)) { return null; } if (is_subclass_of($className, 'yii\base\Controller')) { return Yii::createObject($className, [$id, $this]); } elseif (YII_DEBUG) { throw new InvalidConfigException("Controller class must extend from \\yii\\base\\Controller."); } else { return null; } }
if (($pos = strrpos($route, '/')) !== false) { $id .= '/' . substr($route, 0, $pos); $route = substr($route, $pos + 1); } $controller = $this->createControllerByID($id); if ($controller === null && $route !== '') { $controller = $this->createControllerByID($id . '/' . $route); $route = ''; } return $controller === null ? false : [$controller, $route];
* @param array $params the parameters to be passed to the action * @return mixed the result of the action. * @throws InvalidRouteException if the requested route cannot be resolved into an action successfully */ public function runAction($route, $params = []) { $parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params);
$route = $this->catchAll[0]; $params = array_splice($this->catchAll, 1); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
require(__DIR__ . '/../../common/config/main-local.php'), require(__DIR__ . '/../config/main.php'), require(__DIR__ . '/../config/main-local.php') ); $application = new yii\web\Application($config); $application->run();
$_GET = [ 'edition_id' => '22', 'artist_id' => '110', ]; $_SERVER = [ 'LSPHP_ENABLE_USER_INI' => 'on', 'PATH' => '/usr/local/bin:/usr/bin:/bin', 'TEMP' => '/tmp', 'TMP' => '/tmp', 'TMPDIR' => '/tmp', 'PWD' => '/', 'HTTP_ACCEPT' => '*/*', 'CONTENT_LENGTH' => '0', 'HTTP_HOST' => 'spotteart.com', 'HTTP_REFERER' => 'http://spotteart.com/site/gallery?edition_id=22&artist_id=110', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_X_FORWARDED_FOR' => '23.20.220.59', 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_X_REAL_IP' => '23.20.220.59', 'HTTP_X_SUCURI_CLIENTIP' => '23.20.220.59', 'HTTP_X_SUCURI_COUNTRY' => 'US', 'HTTP_X_HTTPS' => '1', 'REDIRECT_REDIRECT_REDIRECT_UNIQUE_ID' => 'ZfloZb3tgy0z_IDc7bZxzAAAAKI', 'REDIRECT_REDIRECT_REDIRECT_SCRIPT_URL' => '/site/gallery', 'REDIRECT_REDIRECT_REDIRECT_SCRIPT_URI' => 'https://spotteart.com/site/gallery', 'REDIRECT_REDIRECT_REDIRECT_USER_ID' => '8327458', 'REDIRECT_REDIRECT_REDIRECT_HTTPS' => 'on', 'REDIRECT_REDIRECT_REDIRECT_SSL_TLS_SNI' => 'spotteart.com', 'REDIRECT_REDIRECT_REDIRECT_STATUS' => '200', 'REDIRECT_REDIRECT_UNIQUE_ID' => 'ZfloZb3tgy0z_IDc7bZxzAAAAKI', 'REDIRECT_REDIRECT_SCRIPT_URL' => '/site/gallery', 'REDIRECT_REDIRECT_SCRIPT_URI' => 'https://spotteart.com/site/gallery', 'REDIRECT_REDIRECT_USER_ID' => '8327458', 'REDIRECT_REDIRECT_HTTPS' => 'on', 'REDIRECT_REDIRECT_SSL_TLS_SNI' => 'spotteart.com', 'REDIRECT_REDIRECT_STATUS' => '200', 'REDIRECT_UNIQUE_ID' => 'ZfloZb3tgy0z_IDc7bZxzAAAAKI', 'REDIRECT_SCRIPT_URL' => '/site/gallery', 'REDIRECT_SCRIPT_URI' => 'https://spotteart.com/site/gallery', 'REDIRECT_USER_ID' => '8327458', 'REDIRECT_HTTPS' => 'on', 'REDIRECT_SSL_TLS_SNI' => 'spotteart.com', 'REDIRECT_STATUS' => '200', 'UNIQUE_ID' => 'ZfloZb3tgy0z_IDc7bZxzAAAAKI', 'SCRIPT_URL' => '/site/gallery', 'SCRIPT_URI' => 'https://spotteart.com/site/gallery', 'USER_ID' => '8327458', 'HTTPS' => 'on', 'SSL_TLS_SNI' => 'spotteart.com', 'SERVER_SIGNATURE' => '', 'SERVER_SOFTWARE' => 'Apache', 'SERVER_NAME' => 'spotteart.com', 'SERVER_ADDR' => '72.167.206.184', 'SERVER_PORT' => '443', 'REMOTE_ADDR' => '185.93.229.11', 'DOCUMENT_ROOT' => '/home/tevmcgorwzzi/public_html', 'REQUEST_SCHEME' => 'https', 'CONTEXT_PREFIX' => '', 'CONTEXT_DOCUMENT_ROOT' => '/home/tevmcgorwzzi/public_html', 'SERVER_ADMIN' => 'webmaster@spotteart.com', 'SCRIPT_FILENAME' => '/home/tevmcgorwzzi/public_html/frontend/web/index.php', 'REMOTE_PORT' => '29078', 'REDIRECT_URL' => '/index.php', 'REDIRECT_QUERY_STRING' => 'edition_id=22&artist_id=110', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'REQUEST_METHOD' => 'GET', 'QUERY_STRING' => 'edition_id=22&artist_id=110', 'REQUEST_URI' => '/site/gallery?edition_id=22&artist_id=110', 'SCRIPT_NAME' => '/frontend/web/index.php', 'PHP_SELF' => '/frontend/web/index.php', 'REQUEST_TIME_FLOAT' => 1710844005.6464829, 'REQUEST_TIME' => 1710844005, ];