Author: Awais Farooq

  • Phalcon Query Language (PHQL)

    It allows user to implement query language similar to SQL query language. PHQL is implemented as a parser which connects to RDBMS. Phalcon parser uses same technology as SQLite. PHQL consist of features which are listed below: PHQL Life Cycle PHQL allows developers the ability to personalize and customize accordingly. The following is the lifecycle…

  • Phalcon Transactions and Nested Transactions

    Transaction is supported in Phalcon as it is attached with PDO. To increase the performance of the database we can perform data manipulation. Below is the database structure on which transaction is applied: Transaction example: // Database ‘Company’ data deleted. Nested Transaction Example: // Database ‘Company’ data deleted. Event Name Triggered Break Operation afterConnect After a successfully connection to…

  • Insert/Update/Delete Rows

    Inserting Rows Output: Updating Rows Output: Deleting Rows

  • Phalcon Connecting to Database

    We connect the front-end with the backend i.e. database. To access the database we required username and password. Below we connect to the database name: javatpoint and defining configuration file. Example Output:

  • Phalcon Layer

    It powers the model layer in the framework. It is found under the directory Phalcon\Db. It consists of abstraction layer which is written in C programming language. Database Adapter Phalcon uses PDO_ to connect to databases. It supports following Database engines: Class Description Phalcon\Db\Adapter\Pdo\Mysql It is the most used relational database management system (RDBMS) that runs…

  • Security Features

    Phalcon provides security features with the help of Security component, which helps in performing certain tasks like password hashing and Cross-Site Request Forgery (CSRF). Hashing Password Hashing can be defined as the process of converting a fixed length bit string into a specified length in such a way that it cannot be reversed. Any change in the input…

  • Object Document Mapper

    Before starting with the concepts of Object Relational Mapper (ORM) and Object Document Mapper (ODM), it is important to understand the difference between SQL and NoSQL databases. The following table highlights the differences between SQL and NoSQL − SQL NoSQL They are also termed as Relational Databases (RDBMS) They are called as non-relational or distributed database The…

  • Working with Forms

    Forms are used in all web applications to accept inputs from the user as request. The data is accepted as an input, then manipulated and saved in the database or any other operation is being performed. Phalcon includes a component named Phalcon\Forms which helps in the creation and maintenance of forms. Consider the example of Blog-tutorial, which…

  • Asset Management

    Assets are all about the additional components apart from the existing framework in Phalcon. Phalcon has an asset manager which helps to manage all the asset components like CSS or JS files. The common methods used are − Method Importance __construct(variable $options) Initializes the component Phalcon\Assets\Manager addCss(string $path, variable $local, variable $filter, variable $attributes) Adds…

  • Multi-Lingual Support

    Phalcon includes a component Phalcon\Translate which provides multi-lingual support and it is very helpful to create web pages, which gets translated in multiple languages. It includes an adapter which helps in binding arrays and assists in reading translation messages. Example Let us create an output with the help of Translate component in Phalcon, which will help to…