MODPATH/database/classes/kohana/database/mysql.php [ 194 ]
189 {
190 // This benchmark is worthless
191 Profiler::delete($benchmark);
192 }
193
194 throw new Database_Exception(':error [ :query ]',
195 array(':error' => mysql_error($this->_connection), ':query' => $sql),
196 mysql_errno($this->_connection));
197 }
198
199 if (isset($benchmark))
-
MODPATH/database/classes/kohana/database/query.php [ 245 ] » Kohana_Database_MySQL->query(arguments)
0
integer 2
1
string(51) "INSERT INTO `produtos` (`visualizacoes`) VALUES (1)"
2
bool FALSE
3
array(0)
240 return new Database_Result_Cached($result, $sql, $as_object, $object_params); 241 } 242 } 243 244 // Execute the query 245 $result = $db->query($this->_type, $sql, $as_object, $object_params); 246 247 if (isset($cache_key) AND $this->_lifetime > 0) 248 { 249 // Cache the result array 250 Kohana::cache($cache_key, $result->as_array(), $this->_lifetime);
-
MODPATH/orm/classes/kohana/orm.php [ 1252 ] » Kohana_Database_Query->execute(arguments)
0
object Database_MySQL(6)
{ protected _connection_id => string(40) "a0e4599c7faf86368d2ec30d958269344d4e1755" protected _identifier => string(1) "`" public last_query => string(991) "SELECT `produto`.`id` AS `id`, `produto`.`nome` AS `nome`, `produto`.`descricao` AS `descricao`, `produto`.`imagem` AS `imagem`, …" protected _instance => string(7) "default" protected _connection => resource(mysql link persistent) protected _config => array(6) ( "type" => string(5) "mysql" "connection" => array(3) ( "hostname" => string(9) "localhost" "database" => string(15) "hidrauli_banco2" "persistent" => string(5) "FALSE" ) "table_prefix" => string(0) "" "charset" => string(4) "utf8" "caching" => string(5) "FALSE" "profiling" => string(4) "TRUE" ) }
1247 } 1248 1249 $result = DB::insert($this->_table_name) 1250 ->columns(array_keys($data)) 1251 ->values(array_values($data)) 1252 ->execute($this->_db); 1253 1254 if ( ! array_key_exists($this->_primary_key, $data)) 1255 { 1256 // Load the insert id as the primary key if it was left out 1257 $this->_object[$this->_primary_key] = $this->_primary_key_value = $result[0];
-
MODPATH/orm/classes/kohana/orm.php [ 1348 ] » Kohana_ORM->create(arguments)
0
NULL
1343 * @param Validation $validation Validation object 1344 * @return ORM 1345 */ 1346 public function save(Validation $validation = NULL) 1347 { 1348 return $this->loaded() ? $this->update($validation) : $this->create($validation); 1349 } 1350 1351 /** 1352 * Deletes a single record while ignoring relationships. 1353 *
-
APPPATH/classes/model/produto.php [ 18 ] » Kohana_ORM->save()
13 ); 14 15 public function addVisualizacao(){ 16 17 $values['visualizacoes'] = $this->visualizacoes + 1; 18 $this->values($values)->save(); 19 } 20 21 22 23 public static function showBoxProduto($produto, $class, $recomendados = false){
-
APPPATH/classes/controller/produto.php [ 122 ] » Model_Produto->addVisualizacao()
117 118 if(!($produto->id > 0 OR $produto->ativo == 0)){ 119 $this->request->redirect("index/index"); 120 } 121 122 $produto->addVisualizacao(); 123 124 $content = View::factory("index/produtos/produto"); 125 $lateral = View::factory("index/lateral"); 126 127 $content->logado = Model_Cliente::getLogado();
-
{PHP internal call} » Controller_Produto->action_produto()
-
SYSPATH/classes/kohana/request/client/internal.php [ 116 ] » ReflectionMethod->invoke(arguments)
0
object Controller_Produto(4)
{ public template => string(14) "index/template" public usuario => NULL public request => object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
public response => object Response(5){ protected _callback => NULL protected _uri => string(30) "<categoria>/<produto>/ref/<id>" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(7) "produto" "action" => string(7) "produto" ) protected _route_regex => string(84) "#^(?P<categoria>[^/.,;?\n]++)/(?P<produto>[^/.,;?\n]++)/ref/(?P<id>[^/.,;?\n]++)$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }{ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(7) "produto" protected _action => string(7) "produto" protected _uri => string(52) "bombas-hidraulicas/bomba-hidropneumatica-30t/ref/179" protected _external => bool FALSE protected _params => array(3) ( "categoria" => string(18) "bombas-hidraulicas" "produto" => string(25) "bomba-hidropneumatica-30t" "id" => string(3) "179" ) protected _get => array(1) ( "kohara_uri" => string(52) "bombas-hidraulicas/bomba-hidropneumatica-30t/ref/179" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}{ protected _status => integer 200 protected _header => object HTTP_Header(0)
}{ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }111 throw new HTTP_Exception_404('The requested URL :uri was not found on this server.', 112 array(':uri' => $request->uri())); 113 } 114 115 $method = $class->getMethod('action_'.$action); 116 $method->invoke($controller); 117 118 // Execute the "after action" method 119 $class->getMethod('after')->invoke($controller); 120 } 121 catch (Exception $e)
-
SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)
0
object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _callback => NULL protected _uri => string(30) "<categoria>/<produto>/ref/<id>" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(7) "produto" "action" => string(7) "produto" ) protected _route_regex => string(84) "#^(?P<categoria>[^/.,;?\n]++)/(?P<produto>[^/.,;?\n]++)/ref/(?P<id>[^/.,;?\n]++)$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }{ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(7) "produto" protected _action => string(7) "produto" protected _uri => string(52) "bombas-hidraulicas/bomba-hidropneumatica-30t/ref/179" protected _external => bool FALSE protected _params => array(3) ( "categoria" => string(18) "bombas-hidraulicas" "produto" => string(25) "bomba-hidropneumatica-30t" "id" => string(3) "179" ) protected _get => array(1) ( "kohara_uri" => string(52) "bombas-hidraulicas/bomba-hidropneumatica-30t/ref/179" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}59 public function execute(Request $request) 60 { 61 if ($this->_cache instanceof HTTP_Cache) 62 return $this->_cache->execute($this, $request); 63 64 return $this->execute_request($request); 65 } 66 67 /** 68 * Processes the request passed to it and returns the response from 69 * the URI resource identified.
-
SYSPATH/classes/kohana/request.php [ 1164 ] » Kohana_Request_Client->execute(arguments)
0
object Request(20)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _callback => NULL protected _uri => string(30) "<categoria>/<produto>/ref/<id>" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(7) "produto" "action" => string(7) "produto" ) protected _route_regex => string(84) "#^(?P<categoria>[^/.,;?\n]++)/(?P<produto>[^/.,;?\n]++)/ref/(?P<id>[^/.,;?\n]++)$#uD" }
protected _routes => array(0) protected _response => object Response(5){ protected _status => integer 200 protected _header => object HTTP_Header(0)
protected _header => object HTTP_Header(0){ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }{ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(7) "produto" protected _action => string(7) "produto" protected _uri => string(52) "bombas-hidraulicas/bomba-hidropneumatica-30t/ref/179" protected _external => bool FALSE protected _params => array(3) ( "categoria" => string(18) "bombas-hidraulicas" "produto" => string(25) "bomba-hidropneumatica-30t" "id" => string(3) "179" ) protected _get => array(1) ( "kohara_uri" => string(52) "bombas-hidraulicas/bomba-hidropneumatica-30t/ref/179" ) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(2){ protected _previous_environment => NULL protected _cache => NULL }
}1159 throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', array( 1160 ':uri' => $this->_uri, 1161 )); 1162 } 1163 1164 return $this->_client->execute($this); 1165 } 1166 1167 /** 1168 * Returns whether this request is the initial request Kohana received. 1169 * Can be used to test for sub requests.
-
DOCROOT/index.php [ 110 ] » Kohana_Request->execute()
105 /** 106 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 107 * If no source is specified, the URI will be automatically detected. 108 */ 109 echo Request::factory() 110 ->execute() 111 ->send_headers(true) 112 ->body();