Questions tagged [phalcon]

Phalcon is an open source, full stack framework for PHP. Functionality is exposed as PHP classes ready to be used. Written as a C extension, it is optimized for extremely high performance, being the fastest possible framework available for PHP developers.

Phalcon is an open source, full stack framework for and written as a extension, optimized for high performance. Developers don't need to learn or use the C language, since the functionality is exposed as PHP classes ready to be used.

Phalcon is loosely coupled, allowing developers to use the the whole or selected objects as glue components, based on the needs of the application.

Phalcon strives for performance while keeping the framework robust and easy to use.

Phalcon is written in , a language resembling or in syntax.

Downloading

The source for Phalcon is on Github. Compiled packages for Windows can be found on the download page.

Documentation:

  • Tutorial - Begin with a background of the project, go through installation and start by writing a simple hello, world! application. Move on rapidly to the MVC implementation, models, views and tie it all together.

  • API reference - All classes that the framework offers listed and documented.

  • Developer tools - Phalcon offers a set of command line tools that make creating and managing Phalcon projects easier. It is strongly recommended that you install and use them, as many answers and tutorials will depend on them.

  • Incubator - Includes PHP code snippets that are written from the community for the community. These snippets are designed to be drop-ins to current projects to extend the framework according to the needs of the developer.

Help And Support

Help can be found on the official forum, bugs and issues can be reported on Github. There is also a Discord server for informal discussion.

Sample Projects:

Some projects have been created to illustrate how Phalcon works and shared on Github. You can fork and clone these projects as a starting point for your own, or just to get to know the framework.

  • Forum - Perhaps the most practical Phalcon application out there, which is readily available to the public, requiring users to use their github account for authentication. Currently powering the official Phlacon forums.

  • INVO - Sample lightweight application showing you how you could use Phalcon to write an invoicing or accounting application.

  • Vokuro - Sample lightweight application demonstrating authentication and authorization using Phalcon.

  • MVC Examples - Micro MVC example as well as multiple modules examples (with or without namespaces).

  • REST example - REST Micro MVC application with middleware, utilizing .

There is also a list of live sites that are Powered by Phalcon.

2031 questions
4
votes
1 answer

Downgrade Phalcon from previous version?

Im running in Ubuntu 15 and installed Phalcon v3 but i have an issue with our current working API which is using v2 of Phalcon, is there a way to downgrade the current version of Phalcon that i'd installed to the previous v2?
Nebyk
  • 37
  • 6
4
votes
1 answer

Socket.io and Phalcon PHP

I'm using Phalcon PHP and I want to try socket.io for the first time. I did the tutorial chat message with socket.io. But now I want to select some data in my database to count the number of rows in the table 'product' with query Phalcon…
John
  • 4,711
  • 9
  • 51
  • 101
4
votes
1 answer

Unable to left join table on Phalcon

I need to execute left joining for some data retrieving. But surprisingly it doesn't give any answer also when I tried to echo something after that it doesn't echo anything. $exam = $this->modelsManager->createBuilder() ->from('qz_exams') …
sz ashik
  • 881
  • 7
  • 20
4
votes
2 answers

PhalconPHP - redirect in initialize()

In my project I've created AjaxController which operated ajax requests. I'd like to user which enter to url used by ajax get 404 error. In AjaxController.php I have: public function initialize() { if (!$this->request->isAjax()) { …
Robin71
  • 383
  • 5
  • 26
4
votes
2 answers

How to bind $_FILES to a Phalcon Form?

I have this part of code: if ($this->request->isPost() && $this->request->hasFiles()) { $post = $this->request->getPost(); $file = $this->request->getUploadedFiles(); if ($form->isValid($post)) { $form->bind((array)…
Mihai Petcu
  • 368
  • 2
  • 14
4
votes
3 answers

phalcon controller indexAction break down

I am new into Phalcon framework. I just got the basic idea about it. Every controller has methods with multiple specific actions. I wrote a huge indexAction method but now I want to break it down with multiple private method so that I can reuse…
sz ashik
  • 881
  • 7
  • 20
4
votes
3 answers

Handle global exceptions in phalcon

I was wondering, what's the best way to handle exceptions in Phalcon? I'd like to create a default error page for when an error occurs. So I rewrote /app/public/index.html to this:
user4992124
  • 1,574
  • 1
  • 17
  • 35
4
votes
2 answers

Problems with UTF8 Characters in MySQL and Phalcon PHP

I have a project in Phalcon PHP and MySql. when UTF8 characters have to keep these errors are stored. For example: I save : nueva descripción ñññ in Database: nueva descipción ñññ I have tried several types of collations both in the database,…
Andrés Luque
  • 71
  • 1
  • 1
  • 3
4
votes
4 answers

How to get last insert id with Phalcon?

I tried using LAST_INSERT_ID() when getting the last id of the autoincrement primary key column but I get EOF exception : function add($tab) { $champs= ""; $value = ""; $separateur =""; $tab["commande_date"] =…
pheromix
  • 18,213
  • 29
  • 88
  • 158
4
votes
3 answers

Json undefined error

I have action to edit then send json data request->getPost('id'); $data['uname'] = $this->request->getPost('uname'); $data['basesalary'] =…
Jack jdeoel
  • 4,554
  • 5
  • 26
  • 52
4
votes
2 answers

Get size of an array in Volt

In Volt (the template engine for Phalcon) how can I get the number of elements in an array? I've tried sizeof and also count, length and size (hoping to stumble upon the correct command). In this particular instance I'm just interested in whether…
Kvothe
  • 1,819
  • 2
  • 23
  • 37
4
votes
1 answer

Phalcon DI phpStorm IDE not understand my code

I'm using phalcon in a new project but i realized that phpStorm is not understanding my own injectors, for example: /** * Registering the helper component */ $di->set('helper', function () { $helper = new…
Miton Leon
  • 274
  • 1
  • 5
  • 15
4
votes
1 answer

phalcon row locking with models

Since forUpdate still don't work (https://github.com/phalcon/cphalcon/issues/2407), what is best way to lock SELECTed rows in db? I have a innodb table with items to process. I start via cronjob some tasks, which look after items to process…
Glueckstiger
  • 107
  • 1
  • 7
4
votes
2 answers

How to add a remote repository to my own git repository

I have have my own git repository with some subfolders which all belong to my git repository. Now I want to add another subfolder vendor that I cloned from a remote github url. However, When I try to commit the new folder vendor and its…
4
votes
2 answers

PhalconPHP - Cannot load controllers if they are namespaced with Loader

Before I namespaced my application (test app), everything worked fine. But after I started namespacing the controllers, and everything and loading the namespaces like this: $loader = new Loader(); $loader->registerNamespaces( array( …
Artemkller545
  • 979
  • 3
  • 21
  • 55