Phalcon Interview Questions | Eklavya Online

Phalcon Interview Questions

PHQL (Phalcon Query Language) allows user to implement query language similar to SQL query language. PHQL is implemented as a parser which connects to RDBMS.

Routing managed by its Router component. Router components allow us to define routes that are mapped to controllers or handlers that receives the request from the application.

  • Low overhead
  • MVC & HMVC Pattern
  • Dependency Injection
  • Support for Rest
  • Autoloader
  • Router

ODM stands for Object Document Mapper. It offers a CRUD functionality, events and validations among other services in Phalcon.

  • It secures the code using bound parameters.
  • It prevents injection by executing one SQL statement per call.
  • It ignores all comments which mostly used in SQL injections.
  • It only allows data manipulation statement to execute.

Sessions are server-side information storage which helps in user interaction with the website or web application. Each session is consists of unique session ID, which is passed to the web server whenever the browser makes an HTTP request.

Loader is a class found under Phalcon\Loader directory. It also handles error such as if a class does not exist but it is called in any part of program then special handler is called for handling.

Model consists of information or data of the application. It manipulates the data by managing the rules.

CSRF stands for Cross Site Request Forgery. CSRF is created to prevent the form values from being sent outside our application. It generates a random nonce (token) in each form.

In Loader if a class is added according to its need in program, performance is increased as only specific file is included. This technique is known as lazy initialization.

  • Database Independence
  • CRUD functionality
  • Advanced finding capabilities
  • Ability to relate models

CSRF timeout is increased by increasing the token time because tokens default uses sessions.

  • Registering Namespaces
  • Registering Directories
  • Registering Classes
  • Registering Files

Zephir stand for Ze(nd Engine) Ph(p) I(nt)r(mediate). It is used for creation and maintainability of extensions for PHP.

In Phalcon, md5, base64 and sh1 protocol is used to encrypt the password.

It is provided by logging services for application. We can login to different backend using different adapters. It offers transaction logging, configuration options, different formats and filters.

Cookies stores small text files in browser. It is known as browser cookies.

Types of cookies are:

  • Session Cookies
  • Persistent Cookies

Phalcon is an open-source framework of PHP programming language. Phalcon is the first framework that implements ORM in C-programming language.

Phalcon uses Volt templating Engine. Volt provides Phalcon fast execution as it is very fast and designer friendly templating language written in C for PHP. Volt is inspired by Jinja and written by Armin Ronacher.

  • Phalcon\Db\Adapter\Pdo\Mysql : Mysql
  • Phalcon\Db\Adapter\Pdo\Postgresql : Postgresql
  • Phalcon\Db\Adapter\Pdo\Sqlite : SQLite