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
10
votes
4 answers

what are the benefits of using a template engine

I do not understand why a developer would use Phalcon's Volt template engine. In the end, after the compilation, the same PHP files are produced, that I would have to write manually in the first place. To me, it looks only to be detrimental to the…
temuri
  • 2,767
  • 5
  • 41
  • 63
9
votes
4 answers

google recaptcha returns false due to "invalid-input-secret"

I have installed the latest recaptcha from google but it always returns false upon post submit and always returning "invalid-input-secret" error even though the verification is always correct from the frontend view. What could be the reason on this.…
MusicManDev
  • 335
  • 1
  • 3
  • 9
9
votes
2 answers

calling a phalcon php MVC controller via ajax

i am using simple app with phalcon PHP and AngularJs. i am trying to call my phalcon PHP controller from angularJS controller through AJAX POST request. $http.post('/ControllerName/', {params}); and i get 404 The requested URL /ControllerName/…
Ori Price
  • 3,593
  • 2
  • 22
  • 37
9
votes
9 answers

How to use the var_dump output directly from the controller?

class IndexController extends \Phalcon\Mvc\Controller { public function indexAction() { $custom = "Custom variable"; var_dump($custom); } } How to display the result not using the variables in the template? P.S. The…
Yury
  • 908
  • 4
  • 12
  • 26
8
votes
1 answer

PHP Fatal error: Class 'jsonserializable' not found in Unknown on line 0

Ubuntu 16.04 PHP 7.0.4 Phalcon 2.1.x Zephir $~: php -v PHP Fatal error: Class 'jsonserializable' not found in Unknown on line 0 When add phalcon.so in php.ini
8
votes
2 answers

Phalcon on PHP7?

Is PhalconPHP 2.0.10 extension supports PHP 7? I'm planning to start learning Phalcon and I want to run it in PHP 7. I can't find an article or a blog that says Phalcon can run on PHP 7.
Ram
  • 508
  • 3
  • 13
8
votes
2 answers

Phalcon PHP post link with JavaScript confirmation dialog

I am developing a CRUD system in Phalcon PHP (version 1.3.4). My goal is to create a link (delete row), that asks for confirmation on click (JavaScript confirmation box) and then goes (request type POST) to the link. So lets say a user clicks on the…
Tijme
  • 39
  • 2
  • 24
  • 41
8
votes
1 answer

Phalcon save not working

I'm fairly new to Phalcon, I really like it, currently working on my first project in it, however I'm currently coming across an issue with the ORM. I seem to be unable to save. My Users model currently has a simple table setup id (int, PK) name…
André Figueira
  • 6,048
  • 14
  • 48
  • 62
8
votes
1 answer

Namespaces with Phalcon

All my controllers are under the namespace MyApp\Controllers so, as the documentation recommended, I've set my default namespace to it: $dispatcher->setDefaultNamespace('MyApp\Controllers'); But now I need to not only organize my controllers in…
cvsguimaraes
  • 12,910
  • 9
  • 49
  • 73
8
votes
3 answers

IDE autocomplete for PhalconPHP

Is there exist any kind of skeleton for PhalconPHP framework, which I can use in my Netbeans IDE for autocompletion purposes? All I need is a heap of files with class/interface declarations, like this: namespace \Phalcon; class Tag { /** …
Eugene Manuilov
  • 4,271
  • 8
  • 32
  • 48
8
votes
1 answer

How can I set up a user defined function in Volt (Phalcon)

How can I set up a user defined function in Volt? For instance I want to call a function that would translate strings in my views as such: and I want the tr to map to a…
Nikolaos Dimopoulos
  • 11,495
  • 6
  • 39
  • 67
7
votes
6 answers

Phalcon: how to get distinct models?

Using Phalcon Model, how can I get distinct rows when get rows using the find() method.
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
7
votes
3 answers

Phalcon devtools not working

I'm attempting to install Phalcon Dev Tools on OSX. I have Phalcon installed and it works fine. I've followed the instructions from here: http://docs.phalconphp.com/en/latest/reference/mactools.html When I run the command phalcon in the terminal I…
Torra
  • 1,182
  • 5
  • 15
  • 23
7
votes
1 answer

Debugging Phalcon as a PHP developer

I have been a PHP developer working with Magento for years. I'm now wanting to work on a project that has no ecommerce component, and as such Magento is not a good choice. After browsing online at the other PHP frameworks, Phalcon is touted as the…
Sean
  • 1,110
  • 1
  • 14
  • 24
7
votes
4 answers

How to properly initialize database connection in Phalcon

at the moment, I initialize database in following way: $di->set('db', function() use ($config){ return new \Phalcon\Db\Adapter\Pdo\Mysql( array( "host" => $config->database->host, "username" =>…
lot
  • 1,434
  • 18
  • 23