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
5
votes
1 answer

Phalcon . How to get database name from mongoClient / service connection

I'm using Phalcon Framework with mysql and mongo database's services connection for the models of each type. We made a mongo translations system associated to the models to save related translations to mongo db, apart from mysql model…
5
votes
3 answers

How can I access Phalcon configuration data in an external library?

Within my project, I've created a "core" directory which contains certain classes and methods called throughout the controllers. I've defined a configuration parameters in my bootstrap file like so: private function loadConfig () { // Bootstrap …
Ayush Sharma
  • 265
  • 4
  • 13
5
votes
2 answers

Why separate Model and Controller in MVC?

I'm trying to understand the MVC pattern in Phalcon. In my current application I only need ONE template file for each table. The template contains the datagrid, the SQL statement for the SELECT, the form, add/edit/delete-buttons, a search box and…
Dylan
  • 9,129
  • 20
  • 96
  • 153
5
votes
1 answer

phalcon volt bitwise operatios?

I need to run the following logic in the volt templates however it seems to be it doesnt support it. ANy ideas on workarounds ? {% for index, p_key in partner_var %}
mahen3d
  • 7,047
  • 13
  • 51
  • 103
5
votes
2 answers

Phalcon Volt check_field with if else statement for checked

I have a checkbox im trying to build in Volt: So now i would normally write it like this {{ check_field( 'class':'my class', 'data-size':'small',…
user1547410
  • 863
  • 7
  • 27
  • 58
5
votes
1 answer

Option for function distinct phalcon/mvc/collection

Hello I'm using phalcon Framework. I need to make a find, normally I would use distinct, but I not found an option. My class as below : class Calls extends \Phalcon\Mvc\Collection { public $agent; public $number; public $date; public $status; } I…
5
votes
0 answers

Restangular send 403 forbidden error or XMLHttpRequest error from dirrenet host

I wrote this easy comet implementation var app = angular.module('App', ['restangular', 'Comet']); app.config(function(RestangularProvider) { //RestangularProvider.setBaseUrl('http://localhost/my-rest-api/api/v1/'); …
X-Mat
  • 123
  • 1
  • 5
5
votes
1 answer

what's the difference between redirect and dispatch in phalcon?

When I want to change to a page from another, I can find both $this->dispatcher->forward() and $this->response->redirect(). Both seem to work ok. What's the difference between them, and when should I use one over the other?
5
votes
3 answers

Phalcon Zephir vs APC vs HHVM Performance

I started to read about HHVM and Zephir. I was very excited at first, that performance jumps up thanks to this technologies. But then I started to ask myself a question. If It really gives you such performance like owners of this technologies…
Dariss
  • 1,258
  • 1
  • 12
  • 27
5
votes
4 answers

PHP Phalcon: no views?

I'm evaluating frameworks for use with an API, and I'm taking a serious look at PHP Phalcon. It's looking promising - "lean" (load what you need), but with a lot of options. I'm wondering... is it possible to not use views (templates, rather) with…
Mr Mikkél
  • 2,577
  • 4
  • 34
  • 52
5
votes
3 answers

Phalcon: What is the difference between hasOne and belongsTo in 1-1 relationship?

I have 2 tables (2 models) User -uid -email -password -(other fields) Profile -uid -name -age -phone -(other fields) They have 1-1 relationship and I implemented the relationship as following: class User extends Model { public function…
Kevin
  • 1,403
  • 4
  • 18
  • 34
5
votes
2 answers

How to find by multiple criteria with Phalcon findFirst?

I'm trying to get a video from my video database, the selection is based on a unique combination of external_id and language_id (both integers). I tried the following code, but it looks like findFirst() only picks up the first criterium $video =…
KBoek
  • 5,794
  • 5
  • 32
  • 49
5
votes
3 answers

Phalcon Dev Tools - Builder doesn't knows where is the models directory

I'm getting "Builder doesn't knows where is the models directory" error when I run the phalcon all-models command in both Command Line and Phalcon Webtools. Please let me know what am I missing? My webtools.config.php content define('PTOOLS_IP',…
Tuyen Nguyen
  • 4,389
  • 7
  • 51
  • 77
5
votes
3 answers

Netbeans syntax highlighting for volt (twig) and php in phtml files

I'm working with Phalcon in Netbeans. I see I can use twig plugin for template highlighting for volt files. I am using phtml files and want highlighting for volt (twig) and php. Is this possible? Also related - Netbeans keeps duplicating my phtml…
Ally
  • 955
  • 1
  • 15
  • 33
5
votes
1 answer

Check bcrypt passwords always fails Phalcon php

I have a little issue with checking bcrypted passwords with Phalcon php. What I have is : Login script where I check the password $username = $this->request->getPost('username', 'string'); $password = $this->request->getPost('password',…
Andriy Haydash
  • 357
  • 1
  • 14
  • 35