Zend \ Db \ Adapter \ Exception \ InvalidQueryException
Statement could not be executed (42S02 - 1146 - Table 'mastbrok_data.type_contacts_subjects' doesn't exist) Zend\Db\Adapter\Exception\InvalidQueryException thrown with message "Statement could not be executed (42S02 - 1146 - Table 'mastbrok_data.type_contacts_subjects' doesn't exist)" Stacktrace: #28 Zend\Db\Adapter\Exception\InvalidQueryException in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:244 #27 PDOException in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:239 #26 PDOStatement:execute in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Statement.php:239 #25 Zend\Db\Adapter\Driver\Pdo\Statement:execute in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-db/src/TableGateway/AbstractTableGateway.php:239 #24 Zend\Db\TableGateway\AbstractTableGateway:executeSelect in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/AbstractGateway.php:85 #23 Core\Gateway\AbstractGateway:execute in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/AbstractGateway.php:90 #22 Core\Gateway\AbstractGateway:next in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/AbstractGateway.php:99 #21 Core\Gateway\AbstractGateway:toArray in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/AbstractGateway.php:108 #20 Core\Gateway\AbstractGateway:toCollection in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/AbstractGateway.php:113 #19 Core\Gateway\AbstractGateway:get in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/Subjects.php:61 #18 Core\Gateway\Subjects:get in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/AbstractGateway.php:122 #17 Core\Gateway\AbstractGateway:first in /var/www/vhosts/mastbro.kz/httpdocs/core/Gateway/AbstractGateway.php:129 #16 Core\Gateway\AbstractGateway:find in /var/www/vhosts/mastbro.kz/httpdocs/src/Controller/Index.php:176 #15 Src\Controller\Index:contactsPage in /var/www/vhosts/mastbro.kz/httpdocs/core/Middleware/Controller.php:136 #14 call_user_func_array in /var/www/vhosts/mastbro.kz/httpdocs/core/Middleware/Controller.php:136 #13 Core\Middleware\Controller:Core\Middleware\{closure} in /var/www/vhosts/mastbro.kz/httpdocs/core/Middleware/Controller.php:76 #12 call_user_func in /var/www/vhosts/mastbro.kz/httpdocs/core/Middleware/Controller.php:76 #11 Core\Middleware\Controller:processController in /var/www/vhosts/mastbro.kz/httpdocs/core/Middleware/Controller.php:54 #10 Core\Middleware\Controller:process in /var/www/vhosts/mastbro.kz/httpdocs/core/Middleware/FindController.php:60 #9 Core\Middleware\FindController:process in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-stratigility/src/Next.php:128 #8 Zend\Stratigility\Next:process in /var/www/vhosts/mastbro.kz/httpdocs/core/Service/Locale.php:24 #7 Core\Service\Locale:process in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-stratigility/src/Next.php:128 #6 Zend\Stratigility\Next:process in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-stratigility/src/Middleware/ErrorHandler.php:157 #5 Zend\Stratigility\Middleware\ErrorHandler:process in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-expressive/src/Middleware/LazyLoadingMiddleware.php:60 #4 Zend\Expressive\Middleware\LazyLoadingMiddleware:process in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-stratigility/src/Next.php:128 #3 Zend\Stratigility\Next:process in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-stratigility/src/MiddlewarePipe.php:102 #2 Zend\Stratigility\MiddlewarePipe:process in /var/www/vhosts/mastbro.kz/httpdocs/vendor/zendframework/zend-expressive/src/Application.php:374 #1 Zend\Expressive\Application:run in /var/www/vhosts/mastbro.kz/httpdocs/public/index.php:17 #0 {closure} in /var/www/vhosts/mastbro.kz/httpdocs/public/index.php:18
Stack frames (29)
28
Zend
\
Db
\
Adapter
\
Exception
\
InvalidQueryException
/
vendor
/
zendframework
/
zend-db
/
src
/
Adapter
/
Driver
/
Pdo
/
Statement.php
244
27
PDOException
/
vendor
/
zendframework
/
zend-db
/
src
/
Adapter
/
Driver
/
Pdo
/
Statement.php
239
26
PDOStatement
execute
/
vendor
/
zendframework
/
zend-db
/
src
/
Adapter
/
Driver
/
Pdo
/
Statement.php
239
25
Zend
\
Db
\
Adapter
\
Driver
\
Pdo
\
Statement
execute
/
vendor
/
zendframework
/
zend-db
/
src
/
TableGateway
/
AbstractTableGateway.php
239
24
Zend
\
Db
\
TableGateway
\
AbstractTableGateway
executeSelect
/
core
/
Gateway
/
AbstractGateway.php
85
23
Core
\
Gateway
\
AbstractGateway
execute
/
core
/
Gateway
/
AbstractGateway.php
90
22
Core
\
Gateway
\
AbstractGateway
next
/
core
/
Gateway
/
AbstractGateway.php
99
21
Core
\
Gateway
\
AbstractGateway
toArray
/
core
/
Gateway
/
AbstractGateway.php
108
20
Core
\
Gateway
\
AbstractGateway
toCollection
/
core
/
Gateway
/
AbstractGateway.php
113
19
Core
\
Gateway
\
AbstractGateway
get
/
core
/
Gateway
/
Subjects.php
61
18
Core
\
Gateway
\
Subjects
get
/
core
/
Gateway
/
AbstractGateway.php
122
17
Core
\
Gateway
\
AbstractGateway
first
/
core
/
Gateway
/
AbstractGateway.php
129
16
Core
\
Gateway
\
AbstractGateway
find
/
src
/
Controller
/
Index.php
176
15
Src
\
Controller
\
Index
contactsPage
/
core
/
Middleware
/
Controller.php
136
14
call_user_func_array
/
core
/
Middleware
/
Controller.php
136
13
Core
\
Middleware
\
Controller
Core
\
Middleware
\
{closure}
/
core
/
Middleware
/
Controller.php
76
12
call_user_func
/
core
/
Middleware
/
Controller.php
76
11
Core
\
Middleware
\
Controller
processController
/
core
/
Middleware
/
Controller.php
54
10
Core
\
Middleware
\
Controller
process
/
core
/
Middleware
/
FindController.php
60
9
Core
\
Middleware
\
FindController
process
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Next.php
128
8
Zend
\
Stratigility
\
Next
process
/
core
/
Service
/
Locale.php
24
7
Core
\
Service
\
Locale
process
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Next.php
128
6
Zend
\
Stratigility
\
Next
process
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Middleware
/
ErrorHandler.php
157
5
Zend
\
Stratigility
\
Middleware
\
ErrorHandler
process
/
vendor
/
zendframework
/
zend-expressive
/
src
/
Middleware
/
LazyLoadingMiddleware.php
60
4
Zend
\
Expressive
\
Middleware
\
LazyLoadingMiddleware
process
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Next.php
128
3
Zend
\
Stratigility
\
Next
process
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
MiddlewarePipe.php
102
2
Zend
\
Stratigility
\
MiddlewarePipe
process
/
vendor
/
zendframework
/
zend-expressive
/
src
/
Application.php
374
1
Zend
\
Expressive
\
Application
run
/
public
/
index.php
17
0
{closure}
/
public
/
index.php
18
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-db
/
src
/
Adapter
/
Driver
/
Pdo
/
Statement.php
        if (is_array($parameters)) {
            $this->parameterContainer->setFromArray($parameters);
        }
 
        if ($this->parameterContainer->count() > 0) {
            $this->bindParametersFromContainer();
        }
        /** END Standard ParameterContainer Merging Block */
 
        if ($this->profiler) {
            $this->profiler->profilerStart($this);
        }
 
        try {
            $this->resource->execute();
        } catch (\PDOException $e) {
            if ($this->profiler) {
                $this->profiler->profilerFinish();
            }
            throw new Exception\InvalidQueryException(
                'Statement could not be executed (' . implode(' - ', $this->resource->errorInfo()) . ')',
                null,
                $e
            );
        }
 
        if ($this->profiler) {
            $this->profiler->profilerFinish();
        }
 
        $result = $this->driver->createResult($this->resource, $this);
        return $result;
    }
 
    /**
     * Bind parameters from container
     */
    protected function bindParametersFromContainer()
    {
        if ($this->parametersBound) {
Arguments
  1. "Statement could not be executed (42S02 - 1146 - Table 'mastbrok_data.type_contacts_subjects' doesn't exist)"
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-db
/
src
/
Adapter
/
Driver
/
Pdo
/
Statement.php
            } else {
                $this->parameterContainer = new ParameterContainer();
            }
        }
 
        if (is_array($parameters)) {
            $this->parameterContainer->setFromArray($parameters);
        }
 
        if ($this->parameterContainer->count() > 0) {
            $this->bindParametersFromContainer();
        }
        /** END Standard ParameterContainer Merging Block */
 
        if ($this->profiler) {
            $this->profiler->profilerStart($this);
        }
 
        try {
            $this->resource->execute();
        } catch (\PDOException $e) {
            if ($this->profiler) {
                $this->profiler->profilerFinish();
            }
            throw new Exception\InvalidQueryException(
                'Statement could not be executed (' . implode(' - ', $this->resource->errorInfo()) . ')',
                null,
                $e
            );
        }
 
        if ($this->profiler) {
            $this->profiler->profilerFinish();
        }
 
        $result = $this->driver->createResult($this->resource, $this);
        return $result;
    }
 
    /**
Arguments
  1. "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mastbrok_data.type_contacts_subjects' doesn't exist"
    
Exception message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mastbrok_data.type_contacts_subjects' doesn't exist
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-db
/
src
/
Adapter
/
Driver
/
Pdo
/
Statement.php
            } else {
                $this->parameterContainer = new ParameterContainer();
            }
        }
 
        if (is_array($parameters)) {
            $this->parameterContainer->setFromArray($parameters);
        }
 
        if ($this->parameterContainer->count() > 0) {
            $this->bindParametersFromContainer();
        }
        /** END Standard ParameterContainer Merging Block */
 
        if ($this->profiler) {
            $this->profiler->profilerStart($this);
        }
 
        try {
            $this->resource->execute();
        } catch (\PDOException $e) {
            if ($this->profiler) {
                $this->profiler->profilerFinish();
            }
            throw new Exception\InvalidQueryException(
                'Statement could not be executed (' . implode(' - ', $this->resource->errorInfo()) . ')',
                null,
                $e
            );
        }
 
        if ($this->profiler) {
            $this->profiler->profilerFinish();
        }
 
        $result = $this->driver->createResult($this->resource, $this);
        return $result;
    }
 
    /**
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-db
/
src
/
TableGateway
/
AbstractTableGateway.php
        if ($selectState['table'] != $this->table
            && (is_array($selectState['table'])
                && end($selectState['table']) != $this->table)
        ) {
            throw new Exception\RuntimeException(
                'The table name of the provided Select object must match that of the table'
            );
        }
 
        if ($selectState['columns'] == [Select::SQL_STAR]
            && $this->columns !== []) {
            $select->columns($this->columns);
        }
 
        // apply preSelect features
        $this->featureSet->apply(EventFeatureEventsInterface::EVENT_PRE_SELECT, [$select]);
 
        // prepare and execute
        $statement = $this->sql->prepareStatementForSqlObject($select);
        $result = $statement->execute();
 
        // build result set
        $resultSet = clone $this->resultSetPrototype;
        $resultSet->initialize($result);
 
        // apply postSelect features
        $this->featureSet->apply(EventFeatureEventsInterface::EVENT_POST_SELECT, [$statement, $result, $resultSet]);
 
        return $resultSet;
    }
 
    /**
     * Insert
     *
     * @param  array $set
     * @return int
     */
    public function insert($set)
    {
        if (!$this->isInitialized) {
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
AbstractGateway.php
    {
        $select = $this->getSelect();
 
        if ($where instanceof \Closure) {
            $where($select);
        } elseif ($where !== null) {
            $select->where($where);
        }
 
        return $this->selectWith($select);
    }
 
    public function selectWith(Select $select)
    {
        return $this->setSelect($select);
    }
 
    public function execute()
    {
        return parent::executeSelect($this->getSelect());
    }
 
    public function next()
    {
        foreach ($this->execute() as $row) {
            yield $this->model()->exchangeArray((array)$row);
        }
    }
 
    public function toArray()
    {
        $rows = [];
 
        foreach ($this->next() as $row) {
            $rows[] = $row;
        }
 
        return $rows;
    }
 
Arguments
  1. Select {#8309}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
AbstractGateway.php
        } elseif ($where !== null) {
            $select->where($where);
        }
 
        return $this->selectWith($select);
    }
 
    public function selectWith(Select $select)
    {
        return $this->setSelect($select);
    }
 
    public function execute()
    {
        return parent::executeSelect($this->getSelect());
    }
 
    public function next()
    {
        foreach ($this->execute() as $row) {
            yield $this->model()->exchangeArray((array)$row);
        }
    }
 
    public function toArray()
    {
        $rows = [];
 
        foreach ($this->next() as $row) {
            $rows[] = $row;
        }
 
        return $rows;
    }
 
    public function toCollection()
    {
        return $this->collection($this->toArray());
    }
 
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
AbstractGateway.php
        return $this->setSelect($select);
    }
 
    public function execute()
    {
        return parent::executeSelect($this->getSelect());
    }
 
    public function next()
    {
        foreach ($this->execute() as $row) {
            yield $this->model()->exchangeArray((array)$row);
        }
    }
 
    public function toArray()
    {
        $rows = [];
 
        foreach ($this->next() as $row) {
            $rows[] = $row;
        }
 
        return $rows;
    }
 
    public function toCollection()
    {
        return $this->collection($this->toArray());
    }
 
    public function get()
    {
        return $this->toCollection()->keyBy('id');
    }
 
    public function first()
    {
        $this->select(function (Select $select) {
            $select->limit(1);
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
AbstractGateway.php
    {
        foreach ($this->execute() as $row) {
            yield $this->model()->exchangeArray((array)$row);
        }
    }
 
    public function toArray()
    {
        $rows = [];
 
        foreach ($this->next() as $row) {
            $rows[] = $row;
        }
 
        return $rows;
    }
 
    public function toCollection()
    {
        return $this->collection($this->toArray());
    }
 
    public function get()
    {
        return $this->toCollection()->keyBy('id');
    }
 
    public function first()
    {
        $this->select(function (Select $select) {
            $select->limit(1);
        });
 
        return $this->get()->first();
    }
 
    public function find($id)
    {
        $this->select(['id' => $id]);
 
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
AbstractGateway.php
 
    public function toArray()
    {
        $rows = [];
 
        foreach ($this->next() as $row) {
            $rows[] = $row;
        }
 
        return $rows;
    }
 
    public function toCollection()
    {
        return $this->collection($this->toArray());
    }
 
    public function get()
    {
        return $this->toCollection()->keyBy('id');
    }
 
    public function first()
    {
        $this->select(function (Select $select) {
            $select->limit(1);
        });
 
        return $this->get()->first();
    }
 
    public function find($id)
    {
        $this->select(['id' => $id]);
 
        return $this->first();
    }
 
    public function count()
    {
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
Subjects.php
    /** @return Subject */
    public function model()
    {
        $individualModelClass = 'Src\Model\\'.$this->getType('name');
 
        if (class_exists($individualModelClass)) {
            return new $individualModelClass;
        }
 
        return new Subject($this->getType('name'));
    }
 
    public function collection($array)
    {
        return new Collection\SubjectsCollection($array);
    }
 
    public function get()
    {
        $subjects = parent::get();
 
        if ($subjects->count() && count($this->withRelations)) {
            Relations::of($this->getType('name'))->load($subjects, $this->withRelations);
        }
 
        return $subjects;
    }
 
    protected function executeDelete(Delete $delete)
    {
        $select = (new Select($this->getTable()))->columns(['id'])->where($delete->where);
 
        if (!$this->selectWith($select)->count()) return false;
 
        $childsQueryLine = [];
 
        if (($childs = $this->getType()->getDirectRelations()->filter(function (Attribute\Relation\DirectRelation $item) {
            return $item->isStrong();
        }))->count()) {
 
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
AbstractGateway.php
        return $rows;
    }
 
    public function toCollection()
    {
        return $this->collection($this->toArray());
    }
 
    public function get()
    {
        return $this->toCollection()->keyBy('id');
    }
 
    public function first()
    {
        $this->select(function (Select $select) {
            $select->limit(1);
        });
 
        return $this->get()->first();
    }
 
    public function find($id)
    {
        $this->select(['id' => $id]);
 
        return $this->first();
    }
 
    public function count()
    {
        $select = clone $this->getSelect();
 
        $select->columns(['count' => new Expression('COUNT(1)')]);
 
        $statement = $this->sql->prepareStatementForSqlObject($select);
      //  var_dump($statement->getSql());
        return $statement->execute()->current()['count'];
    }
 
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Gateway
/
AbstractGateway.php
 
    public function get()
    {
        return $this->toCollection()->keyBy('id');
    }
 
    public function first()
    {
        $this->select(function (Select $select) {
            $select->limit(1);
        });
 
        return $this->get()->first();
    }
 
    public function find($id)
    {
        $this->select(['id' => $id]);
 
        return $this->first();
    }
 
    public function count()
    {
        $select = clone $this->getSelect();
 
        $select->columns(['count' => new Expression('COUNT(1)')]);
 
        $statement = $this->sql->prepareStatementForSqlObject($select);
      //  var_dump($statement->getSql());
        return $statement->execute()->current()['count'];
    }
 
    public function paginate($perPage = 15, $pageName = 'page')
    {
        $paginator = new Pagination($this->count(), $perPage, $pageName);
 
        $this->select(function (Select $select) use ($paginator) {
 
            $page = $paginator->get('page');
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
src
/
Controller
/
Index.php
        $m_body = Template::render('src/mail/mail',['data'=>$m_data]);
 
        $title = 'Сообщение с формы обратной связи';
 
        if(isset($request['form_name'])){
            $title = $request['form_name'];
        }
        if(isset($request['title']) && !empty($request['title'])){
            $title = $request['title'];
            unset($request['title']);
        }
 
        $this->send_mail($title,$m_body);
 
        return $this->json(['error'=>'']);
    }
 
    public function contactsPage() {
       
        $page = Subjects::of('Contacts')->find(8);
        // dump($page);
        return $this->html(Template::render('src/contacts',['page'=>$page]));
    }
 
    public function salePage() {
        return $this->html(Template::render('src/sale'));
    }
 
    public function aboutPage() {
         $preims = Subjects::of('Preim')->get();
        $preimTitle = Subjects::of('Variable')->find(26);
        $page = Subjects::of('AboutPage')->find(1);
        return $this->html(Template::render('src/about',['page'=>$page, 'preims'=>$preims, 'preimTitle' => $preimTitle]));
    }
 
    public function eventsPage() {
        $page = Subjects::of('Events')->find(1);
        return $this->html(Template::render('src/events',['page'=>$page]));
    }
 
Arguments
  1. 8
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Middleware
/
Controller.php
    }
 
    private function addRoute($route, $method, $callback)
    {
        if (is_callable($callback)) {
 
            $middleware = function () use ($callback) {
                return call_user_func_array($callback, Registry::pull('http.request.attributes'));
            };
 
        } elseif (is_string($callback)) {
 
            if (!method_exists($this, $callback)) {
                throw new RuntimeException(
                    'No method '.get_class($this).'::'.$method.'() for route "'.$route.'"'
                );
            }
 
            $middleware = function () use ($callback) {
                return call_user_func_array([$this, $callback], Registry::pull('http.request.attributes'));
            };
 
        } else {
            throw new RuntimeException(
                '$callback shoud be callable or string type'
            );
        }
 
        if (!$this->router) {
            $this->router = App::getInstance()->getContainer()->build(RouterInterface::class);
        }
 
        $this->router->addRoute(new Route($route, $middleware, [$method]));
    }
}
 
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Middleware
/
Controller.php
    }
 
    private function addRoute($route, $method, $callback)
    {
        if (is_callable($callback)) {
 
            $middleware = function () use ($callback) {
                return call_user_func_array($callback, Registry::pull('http.request.attributes'));
            };
 
        } elseif (is_string($callback)) {
 
            if (!method_exists($this, $callback)) {
                throw new RuntimeException(
                    'No method '.get_class($this).'::'.$method.'() for route "'.$route.'"'
                );
            }
 
            $middleware = function () use ($callback) {
                return call_user_func_array([$this, $callback], Registry::pull('http.request.attributes'));
            };
 
        } else {
            throw new RuntimeException(
                '$callback shoud be callable or string type'
            );
        }
 
        if (!$this->router) {
            $this->router = App::getInstance()->getContainer()->build(RouterInterface::class);
        }
 
        $this->router->addRoute(new Route($route, $middleware, [$method]));
    }
}
 
Arguments
  1. array:2 [
      0 => Index {#7284}
      1 => "contactsPage"
    ]
    
  2. []
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Middleware
/
Controller.php
    private function processController(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $this->boot('bootRouting');
 
        if (!$this->router || ($result = $this->router->match($request))->isFailure()) {
            return $delegate->process($request);
        }
 
        $this->request = $request;
        $this->delegate = $delegate;
 
        Template::defaults([
            'this' => $this
        ]);
 
        Registry::set('http.controller.object', $this);
        Registry::set('http.request.attributes', $result->getMatchedParams());
 
        $this->boot('bootDispatch');
        return call_user_func($result->getMatchedMiddleware());
    }
 
    protected function path($route = null)
    {
        return Registry::get('http.controller.path').$route;
    }
 
    protected function response($status, $headers = [])
    {
        return new EmptyResponse($status, $headers);
    }
 
    protected function redirect($url, $status = 302, array $headers = [])
    {
        return new RedirectResponse($url, $status, $headers);
    }
 
    protected function html($html, $status = 200, array $headers = [])
    {
        return new HtmlResponse($html, $status, $headers);
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Middleware
/
Controller.php
    private function processController(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $this->boot('bootRouting');
 
        if (!$this->router || ($result = $this->router->match($request))->isFailure()) {
            return $delegate->process($request);
        }
 
        $this->request = $request;
        $this->delegate = $delegate;
 
        Template::defaults([
            'this' => $this
        ]);
 
        Registry::set('http.controller.object', $this);
        Registry::set('http.request.attributes', $result->getMatchedParams());
 
        $this->boot('bootDispatch');
        return call_user_func($result->getMatchedMiddleware());
    }
 
    protected function path($route = null)
    {
        return Registry::get('http.controller.path').$route;
    }
 
    protected function response($status, $headers = [])
    {
        return new EmptyResponse($status, $headers);
    }
 
    protected function redirect($url, $status = 302, array $headers = [])
    {
        return new RedirectResponse($url, $status, $headers);
    }
 
    protected function html($html, $status = 200, array $headers = [])
    {
        return new HtmlResponse($html, $status, $headers);
Arguments
  1. Closure {#7303
      class: "Core\Middleware\Controller"
      this: Index {#7284 …}
      use: {
        $callback: "contactsPage"
      }
    }
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Middleware
/
Controller.php
            }
        }
    }
 
    protected function middleware($middleware)
    {
        $this->middlewares[] = $middleware;
    }
 
    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $this->boot('bootProcess');
 
        foreach($this->middlewares as $middleware) {
            if(($return = $middleware->process($request, $delegate)) !== null) {//if anything returned
                return $return;
            }
        }
 
        return $this->processController($request, $delegate);
    }
 
    private function processController(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $this->boot('bootRouting');
 
        if (!$this->router || ($result = $this->router->match($request))->isFailure()) {
            return $delegate->process($request);
        }
 
        $this->request = $request;
        $this->delegate = $delegate;
 
        Template::defaults([
            'this' => $this
        ]);
 
        Registry::set('http.controller.object', $this);
        Registry::set('http.request.attributes', $result->getMatchedParams());
 
Arguments
  1. ServerRequest {#7283}
    
  2. Next {#7245}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Middleware
/
FindController.php
 
        if ($controllerPath != '/') {
            $request = App::stripRouteFromPath($request, $controllerPath);
        }
 
 
 
        Registry::set('http.request.method', $request->getMethod());
        Registry::set('http.request.path', $request->getUri()->getPath());
        Registry::set('http.request.headers', $request->getHeaders());
        Registry::set('http.request.cookies', $request->getCookieParams());
        Registry::set('http.request.query', $request->getQueryParams());
        Registry::set('http.request.body', $request->getParsedBody());
        Registry::set('http.request.files', $request->getUploadedFiles());
        Registry::set('http.request.server', $request->getServerParams());
 
        Registry::set('http.controller.path', Locale::getLocalePath().$controllerPath);
        Registry::set('http.controller.class', $controllerClass);
 
        return (new $controllerClass)->process($request, $delegate);
    }
 
    private function controllerClassName($name)
    {
        return str_replace('-', '', ucwords($name, '-'));
    }
}
Arguments
  1. ServerRequest {#7283}
    
  2. Next {#7245}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Next.php
        $normalizedRoute = (strlen($route) > 1) ? rtrim($route, '/') : $route;
 
        // Skip if layer path does not match current url
        if (substr(strtolower($path), 0, strlen($normalizedRoute)) !== strtolower($normalizedRoute)) {
            return $this->process($request);
        }
 
        // Skip if match is not at a border ('/', '.', or end)
        $border = $this->getBorder($path, $normalizedRoute);
        if ($border && '/' !== $border && '.' !== $border) {
            return $this->process($request);
        }
 
        // Trim off the part of the url that matches the layer route
        if (! empty($route) && $route !== '/') {
            $request = $this->stripRouteFromPath($request, $route);
        }
 
        $middleware = $layer->handler;
        $response = $middleware->process($request, $this);
 
        if (! $response instanceof ResponseInterface) {
            throw new Exception\MissingResponseException(sprintf(
                "Last middleware executed did not return a response.\nMethod: %s\nPath: %s\n.Handler: %s",
                $request->getMethod(),
                $request->getUri()->getPath(),
                get_class($middleware)
            ));
        }
 
        return $response;
    }
 
    /**
     * Toggle the "raise throwables" flag on.
     *
     * @deprecated Since 2.0.0; this functionality is now a no-op.
     * @return void
     */
    public function raiseThrowables()
Arguments
  1. ServerRequest {#7283}
    
  2. Next {#7245}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
core
/
Service
/
Locale.php
use Interop\Http\ServerMiddleware\MiddlewareInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response\RedirectResponse;

class Locale implements MiddlewareInterface
{
    protected static $locales = [];
    protected static $locale;
    protected static $default;

    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        if (($locale = substr($request->getUri()->getPath(), 1, 2)) && in_array($locale, static::getLocales()) && in_array(substr($request->getUri()->getPath(), 3, 1), ['/', false, ''])) {
            static::setLocale($locale);
            $request = App::stripRouteFromPath($request, '/'.$locale);
        } elseif (($localePath = static::getLocalePath())) {// to prevent doubled-content for google
            return new RedirectResponse($localePath.$request->getUri()->getPath());
        }

        return $delegate->process($request);
    }

    /**
     * @param string $locale
     * @throws \Exception
     */
    public static function setLocales(array $locales)
    {
        self::$locales = $locales;
        self::$default = current($locales);
    }

    /**
     * @return array
     */
    public static function getLocales()
    {
        return self::$locales;
    }

Arguments
  1. ServerRequest {#7283}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Next.php
        $normalizedRoute = (strlen($route) > 1) ? rtrim($route, '/') : $route;
 
        // Skip if layer path does not match current url
        if (substr(strtolower($path), 0, strlen($normalizedRoute)) !== strtolower($normalizedRoute)) {
            return $this->process($request);
        }
 
        // Skip if match is not at a border ('/', '.', or end)
        $border = $this->getBorder($path, $normalizedRoute);
        if ($border && '/' !== $border && '.' !== $border) {
            return $this->process($request);
        }
 
        // Trim off the part of the url that matches the layer route
        if (! empty($route) && $route !== '/') {
            $request = $this->stripRouteFromPath($request, $route);
        }
 
        $middleware = $layer->handler;
        $response = $middleware->process($request, $this);
 
        if (! $response instanceof ResponseInterface) {
            throw new Exception\MissingResponseException(sprintf(
                "Last middleware executed did not return a response.\nMethod: %s\nPath: %s\n.Handler: %s",
                $request->getMethod(),
                $request->getUri()->getPath(),
                get_class($middleware)
            ));
        }
 
        return $response;
    }
 
    /**
     * Toggle the "raise throwables" flag on.
     *
     * @deprecated Since 2.0.0; this functionality is now a no-op.
     * @return void
     */
    public function raiseThrowables()
Arguments
  1. ServerRequest {#7283}
    
  2. Next {#7245}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Middleware
/
ErrorHandler.php
     * Adds an error handler that will convert PHP errors to ErrorException
     * instances.
     *
     * Internally, wraps the call to $next() in a try/catch block, catching
     * all PHP Throwables (PHP 7) and Exceptions (PHP 5.6 and earlier).
     *
     * When an exception is caught, an appropriate error response is created
     * and returned instead; otherwise, the response returned by $next is
     * used.
     *
     * @param ServerRequestInterface $request
     * @param DelegateInterface $delegate
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        set_error_handler($this->createErrorHandler());
 
        try {
            $response = $delegate->process($request);
 
            if (! $response instanceof ResponseInterface) {
                throw new MissingResponseException('Application did not return a response');
            }
        } catch (Throwable $e) {
            $response = $this->handleThrowable($e, $request);
        } catch (Exception $e) {
            $response = $this->handleThrowable($e, $request);
        }
 
        restore_error_handler();
 
        return $response;
    }
 
    /**
     * Handles all throwables/exceptions, generating and returning a response.
     *
     * Passes the error, request, and response prototype to createErrorResponse(),
     * triggers all listeners with the same arguments (but using the response
Arguments
  1. ServerRequest {#7250}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-expressive
/
src
/
Middleware
/
LazyLoadingMiddleware.php
    ) {
        $this->container = $container;
        $this->responsePrototype = $responsePrototype;
        $this->middlewareName = $middlewareName;
    }
 
    /**
     * @param ServerRequestInterface $request
     * @param DelegateInterface $delegate
     * @return ResponseInterface
     * @throws InvalidMiddlewareException for invalid middleware types pulled
     *     from the container.
     */
    public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $middleware = $this->container->get($this->middlewareName);
 
        // http-interop middleware
        if ($middleware instanceof ServerMiddlewareInterface) {
            return $middleware->process($request, $delegate);
        }
 
        // Unknown - invalid!
        if (! is_callable($middleware)) {
            throw new InvalidMiddlewareException(sprintf(
                'Lazy-loaded middleware "%s" is neither invokable nor implements %s',
                $this->middlewareName,
                ServerMiddlewareInterface::class
            ));
        }
 
        // Callable http-interop middleware
        if ($this->isCallableInteropMiddleware($middleware)) {
            return $middleware($request, $delegate);
        }
 
        // Legacy double-pass signature
        return $middleware($request, $this->responsePrototype, function ($request, $response) use ($delegate) {
            return $delegate->process($request);
        });
Arguments
  1. ServerRequest {#7250}
    
  2. Next {#7245}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
Next.php
        $normalizedRoute = (strlen($route) > 1) ? rtrim($route, '/') : $route;
 
        // Skip if layer path does not match current url
        if (substr(strtolower($path), 0, strlen($normalizedRoute)) !== strtolower($normalizedRoute)) {
            return $this->process($request);
        }
 
        // Skip if match is not at a border ('/', '.', or end)
        $border = $this->getBorder($path, $normalizedRoute);
        if ($border && '/' !== $border && '.' !== $border) {
            return $this->process($request);
        }
 
        // Trim off the part of the url that matches the layer route
        if (! empty($route) && $route !== '/') {
            $request = $this->stripRouteFromPath($request, $route);
        }
 
        $middleware = $layer->handler;
        $response = $middleware->process($request, $this);
 
        if (! $response instanceof ResponseInterface) {
            throw new Exception\MissingResponseException(sprintf(
                "Last middleware executed did not return a response.\nMethod: %s\nPath: %s\n.Handler: %s",
                $request->getMethod(),
                $request->getUri()->getPath(),
                get_class($middleware)
            ));
        }
 
        return $response;
    }
 
    /**
     * Toggle the "raise throwables" flag on.
     *
     * @deprecated Since 2.0.0; this functionality is now a no-op.
     * @return void
     */
    public function raiseThrowables()
Arguments
  1. ServerRequest {#7250}
    
  2. Next {#7245}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-stratigility
/
src
/
MiddlewarePipe.php
            $delegate = new Delegate\CallableDelegateDecorator($delegate, $response);
        }
 
        return $this->process($request, $delegate);
    }
 
    /**
     * http-interop invocation: single-pass with delegate.
     *
     * Executes the internal pipeline, passing $delegate as the "final
     * handler" in cases when the pipeline exhausts itself.
     *
     * @param Request $request
     * @param DelegateInterface $delegate
     * @return Response
     */
    public function process(Request $request, DelegateInterface $delegate)
    {
        $next = new Next($this->pipeline, $delegate);
        return $next->process($request);
    }
 
    /**
     * Attach middleware to the pipeline.
     *
     * Each middleware can be associated with a particular path; if that
     * path is matched when that middleware is invoked, it will be processed;
     * otherwise it is skipped.
     *
     * No path means it should be executed every request cycle.
     *
     * A handler CAN implement MiddlewareInterface, but MUST be callable.
     *
     * @see MiddlewareInterface
     * @see Next
     * @param string|callable|object $path Either a URI path prefix, or middleware.
     * @param null|callable|object $middleware Middleware
     * @return self
     */
    public function pipe($path, $middleware = null)
Arguments
  1. ServerRequest {#7250}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
vendor
/
zendframework
/
zend-expressive
/
src
/
Application.php
     */
    public function run(ServerRequestInterface $request = null, ResponseInterface $response = null)
    {
        try {
            $request  = $request ?: ServerRequestFactory::fromGlobals();
        } catch (InvalidArgumentException $e) {
            // Unable to parse uploaded files
            $this->emitMarshalServerRequestException($e);
            return;
        } catch (UnexpectedValueException $e) {
            // Invalid request method
            $this->emitMarshalServerRequestException($e);
            return;
        }
 
        $response = $response ?: new Response();
        $request  = $request->withAttribute('originalResponse', $response);
        $delegate = $this->getDefaultDelegate();
 
        $response = $this->process($request, $delegate);
 
        $emitter = $this->getEmitter();
        $emitter->emit($response);
    }
 
    /**
     * Retrieve the IoC container.
     *
     * If no IoC container is registered, we raise an exception.
     *
     * @return ContainerInterface
     * @throws Exception\ContainerNotRegisteredException
     */
    public function getContainer()
    {
        if (null === $this->container) {
            throw new Exception\ContainerNotRegisteredException();
        }
        return $this->container;
    }
Arguments
  1. ServerRequest {#7250}
    
  2. NotFoundDelegate {#7263}
    
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
public
/
index.php
<?php date_default_timezone_set('Asia/Almaty');
 
use Core\Facade\App;
 
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
 
/**
 * Self-called anonymous function that creates its own scope and keep the global namespace clean.
 */
call_user_func(function () {
 
    App::init(require 'config/config.php');
    App::initSession();
    App::initPipeline();
 
    App::getInstance()->run();
});
 
/
var
/
www
/
vhosts
/
mastbro.kz
/
httpdocs
/
public
/
index.php
<?php date_default_timezone_set('Asia/Almaty');
 
use Core\Facade\App;
 
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
 
/**
 * Self-called anonymous function that creates its own scope and keep the global namespace clean.
 */
call_user_func(function () {
 
    App::init(require 'config/config.php');
    App::initSession();
    App::initPipeline();
 
    App::getInstance()->run();
});
 

Environment & details:

Key Value
HTTP Method
"GET"
URI
"https://www.mastbro.kz/ru/contacts"
Script
"/index.php"
Headers
array:6 [
  "referer" => array:1 [
    0 => "https://www.mastbro.kz/contacts"
  ]
  "user-agent" => array:1 [
    0 => "claudebot"
  ]
  "accept" => array:1 [
    0 => "*/*"
  ]
  "connection" => array:1 [
    0 => "close"
  ]
  "x-real-ip" => array:1 [
    0 => "3.236.18.23"
  ]
  "host" => array:1 [
    0 => "www.mastbro.kz"
  ]
]
Cookies
[]
Attributes
array:1 [
  "originalResponse" => Response {#7248}
]
Query String Arguments
[]
Body Params
[]
empty
empty
empty
empty
Key Value
__ZF
array:2 [
  "_REQUEST_ACCESS_TIME" => 1710823177.423
  "_VALID" => array:1 [
    "Zend\Session\Validator\Id" => "9khpr9vk17vkol8lvfb2e40ek2"
  ]
]
Key Value
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
PP_CUSTOM_PHP_INI
"/var/www/vhosts/system/mastbro.kz/etc/php.ini"
PP_CUSTOM_PHP_CGI_INDEX
"plesk-php70-fastcgi"
SCRIPT_NAME
"/index.php"
REQUEST_URI
"/ru/contacts"
QUERY_STRING
""
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.0"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/ru/contacts"
REMOTE_PORT
"64796"
SCRIPT_FILENAME
"/var/www/vhosts/mastbro.kz/httpdocs/public/index.php"
SERVER_ADMIN
"root@localhost"
CONTEXT_DOCUMENT_ROOT
"/var/www/vhosts/mastbro.kz/httpdocs/public"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"https"
DOCUMENT_ROOT
"/var/www/vhosts/mastbro.kz/httpdocs/public"
REMOTE_ADDR
"3.236.18.23"
SERVER_PORT
"443"
SERVER_ADDR
"195.210.46.20"
SERVER_NAME
"www.mastbro.kz"
SERVER_SOFTWARE
"Apache"
SERVER_SIGNATURE
""
HTTP_REFERER
"https://www.mastbro.kz/contacts"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_CONNECTION
"close"
HTTP_X_REAL_IP
"3.236.18.23"
HTTP_HOST
"www.mastbro.kz"
HTTPS
"on"
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
"0"
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
"0"
PERL5LIB
"/usr/share/awstats/lib:/usr/share/awstats/plugins"
SCRIPT_URI
"https://www.mastbro.kz/ru/contacts"
SCRIPT_URL
"/ru/contacts"
UNIQUE_ID
"ZfkXCer9vGwQBfErDmbc5wAAAJE"
REDIRECT_STATUS
"200"
REDIRECT_HTTPS
"on"
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
"0"
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
"0"
REDIRECT_PERL5LIB
"/usr/share/awstats/lib:/usr/share/awstats/plugins"
REDIRECT_SCRIPT_URI
"https://www.mastbro.kz/ru/contacts"
REDIRECT_SCRIPT_URL
"/ru/contacts"
REDIRECT_UNIQUE_ID
"ZfkXCer9vGwQBfErDmbc5wAAAJE"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1710823177.3426
REQUEST_TIME
1710823177
empty
0. Whoops\Handler\PrettyPageHandler