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
7
votes
2 answers

Phalcon PHP Xampp installation - Apache can't find DLL

I am using Windows 7 64bit, Xampp 1.8.3(with PHP 5.5). I'am following Phalcon installation guide, i downloaded x86 version of Phalcon like in this guide. Next i put php_phalcon.dll file in D:/xampp/php/ext. Then, i add to php.ini…
Jacek Jagiełło
  • 223
  • 3
  • 12
7
votes
5 answers

How to run RAW SQL query in PhalconPHP

I try to get result from this query $sql = " SET @col = NULL; SET @sql = NULL; Select Group_Concat(Distinct Concat( 'SUM(CASE WHEN tbl.sdate…
Sir Z.
  • 124
  • 1
  • 1
  • 4
7
votes
1 answer

How it's possible to disable rendering layout in case of xmlhttprequest in phalcon framework?

How can be disabled layout rendering? For a moment i can detect that request is made via jQuery this way: public function initialize() { if (!$this->request->isAjax()) { // disable layout here... how? } } Could it be done globally?…
avasin
  • 9,186
  • 18
  • 80
  • 127
7
votes
2 answers

Cross controller variables in Phalcon

In an effort to keep my code DRY I would like to be able to define "cross controller" variables. Classic example is that I would like access to some config items that are loaded in my bootstap. What is the best practise method of achieving this? Tim
Tim
  • 3,091
  • 9
  • 48
  • 64
7
votes
2 answers

How do I configure custom routes in Phalcon?

I just stumbled at Phalcon (PHP framework) and it looked so promising I decided to try it. I searched in the docs but haven't found anything related to routes in Phalcon. Does somebody know how to create custom routes in this framework or am I…
marcio
  • 10,002
  • 11
  • 54
  • 83
6
votes
1 answer

How to set an alias on a Model::query() in Phalcon Framework

How to set an SQL alias for a Phalcon Model. A method alias() does not exist. A sample of what i need: $modelA = ModelA::query() ->alias('q') ->columns(['q.*','concat(q.id,r.id)) ->join('ModelB', 'q.id = r.model_a_id',…
Mihai Petcu
  • 368
  • 2
  • 14
6
votes
1 answer

Phalcon relationships order

Have such relationship in Phalcon, I need this query ordered by log_time DESC $this->hasMany('id', 'LogDevices', 'tk_fk', [ 'alias' => 'logs', 'order' => 'log_time DESC' ]); What right param I need to pass? Thank you
Denys Klymenko
  • 394
  • 5
  • 18
6
votes
1 answer

Combining and and or operators in Phalcon\Mvc\Model\Criteria

I'm just writing my first phalcon application and have a question for filtering a query using Phalcon\Mvc\Model\Criteria. Finally I want a query like this SELECT * FROM table WHERE status = 'A' AND ( title LIKE 'combining%' OR title…
iRaS
  • 1,958
  • 1
  • 16
  • 29
6
votes
4 answers

Installing Phalcon PHP Devtools: "ERROR: Phalcon extension isn't installed ..." though the module is installed

After some days ago I installed Phalcon PHP, I am more and more exited about it. Now I want to try the Phalcon Devtools out. I've just installed it like in the installation manual via Composer (for Linux) shown. But when I try to execute the phalcon…
automatix
  • 14,018
  • 26
  • 105
  • 230
6
votes
1 answer

Phalcon loading helper file library

I have created a library that which will load a php file (which may contains users custom functions in it...) you can either call it from bootstrap also from the controller. if file does not exists it will display the error msg. Thing is am i doing…
Raj
  • 1,083
  • 8
  • 22
6
votes
9 answers

Volt directory can't be written

The error I am getting is Warning: Phalcon\Mvc\View\Engine\Volt\Compiler::compileFile(../app/views/index/index.phtml.php): failed to open stream: Permission denied in /Users/mattstephens/Sites/magpie/public/index.php on line 26 Phalcon Exception:…
Matt Stephens
  • 922
  • 1
  • 6
  • 24
6
votes
3 answers

PhalconPHP Framework - How to update a model object and the related object

I am working with PhalconPHP and so far I have had little problems. The framework is very good. However, I've run into a problem that I haven't been able to sort out. It's probably a very simple thing but I've been running in circles, and couldn't…
hlasso
  • 389
  • 1
  • 3
  • 7
5
votes
1 answer

Why I'm getting Swift_TransportException: Unable to connect with TLS encryption in Server?

I have migrated to new server from old server. There are quite changes in new server. Old server was using PHP 5.6 and phalcon 3.2 and new server is using PHP 7.3 & phalcon 3.4.4. In old server email sending is working smoothly but in new server…
Iftikhar uddin
  • 3,117
  • 3
  • 29
  • 48
5
votes
1 answer

Phalcon 3: Validating form data using \Phalcon\Mvc\Model\Validator

Since the latest version of Phalcon was released, the examples provided in the documentation do not seem to work correctly. Firstly, I create a new model with DevTools at the command line using phalcon model User. Then, I amend the validation()…
mpdc
  • 3,550
  • 5
  • 25
  • 48
5
votes
1 answer

phalcon file upload fail

I have tried to upload file into server. But where it doesn't work that. This is my form.
This…
sz ashik
  • 881
  • 7
  • 20