Debugging Applications

PHP offers tools to debug applications with notices, warnings, errors and exceptions. The Exception class offers information such as the file, line, message, numeric code, backtrace etc. on where an error occurred. OOP frameworks like Phalcon mainly use this class to encapsulate this functionality and provide information back to the developer or user. Despite being written in C, Phalcon executes methods in the PHP userland, providing the debug capability that any other application or framewor

Mvc\Router\Route::getHostname

public getHostname () Returns the hostname restriction if any

Dispatcher::getActiveMethod

public getActiveMethod () Returns the current method to be/executed in the dispatcher

Validation\Validator\Numericality

extends abstract class Phalcon\Validation\Validator implements Phalcon\Validation\ValidatorInterface Source on GitHub Check for a valid numeric value use Phalcon\Validation\Validator\Numericality; $validator->add('price', new Numericality([ 'message' => ':field is not numeric' ])); $validator->add(['price', 'amount'], new Numericality([ 'message' => [ 'price' => 'price is not numeric', 'amount' => 'amount is not numeric' ] ])); Methods p

Mvc\Micro\CollectionInterface::map

abstract public map (mixed $routePattern, mixed $handler, [mixed $name]) ...

Db\Dialect\Sqlite::dropTable

public dropTable (mixed $tableName, [mixed $schemaName], [mixed $ifExists]) Generates SQL to drop a table

Mvc\View\Engine\Volt\Compiler::compileMacro

public compileMacro (array $statement, mixed $extendsMode) Compiles macros

Mvc\View\Exception

extends class Phalcon\Exception implements Throwable Source on GitHub Methods final private Exception __clone () inherited from Exception Clone the exception public __construct ([string $message], [int $code], [Exception $previous]) inherited from Exception Exception constructor public __wakeup () inherited from Exception ... final public string getMessage () inherited from Exception Gets the Exception message final public int getCode () inherited from Exception Gets the Exception code fin

Db\Adapter\Pdo::executePrepared

public PDOStatement executePrepared (PDOStatement $statement, array $placeholders, array $dataTypes) Executes a prepared statement binding. This function uses integer indexes starting from zero use Phalcon\Db\Column; $statement = $db->prepare('SELECT * FROM robots WHERE name = :name'); $result = $connection->executePrepared($statement, ['name' => 'Voltron'], ['name' => Column::BIND_PARAM_INT]);

Mvc\Model\Transaction::getConnection

public getConnection () Returns the connection related to transaction