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
6 answers

Can't call indexController's actions other than indexAction in Phalcon php

I have a simple project in my xampp/htdocs directory called phalcon and I have apache configured to point to that folder so that I can go to phalcon/ in my browser. The problem occurs when I try to open an index controller view other than…
Andriy Haydash
  • 357
  • 1
  • 14
  • 35
5
votes
1 answer

Phalcon Router and Loader for subfolder structure getting bigger. How to set up?

I have a quite big project that I need to program. I used to code with CodeIgniter but since they stopped maintaining the framework, I decided to switch to another. I chose Phalcon framework. The folder structure of the application that I want to…
cjrb
  • 197
  • 1
  • 2
  • 17
5
votes
4 answers

What CMS can be used with Phalcon framework?

I've been using Wordpress for the past 4 years for developing small and medium websites. Now I have an enterprise project and I'm considering using Phalcon PHP framework. My enterprise project will be handling a large amount of users and will be…
Steven
  • 19,224
  • 47
  • 152
  • 257
5
votes
1 answer

General/Phalcon - ACL and Database Storage

Background I'm currently working on a Phalcon application. The application itself is relatively simple, but I am using it as a tool to learn about some more advanced concepts and techniques. I've ditched my homebrew ACL (access-control list)…
askrich
  • 598
  • 5
  • 20
5
votes
2 answers

All requests requiring connection to mysql are very very slow (using Phalcon)

I've been working on converting an application of mine from CodeIgniter to Phalcon. I've noticed that [query heavy] requests that only took a maximum of 3 or 4 seconds using CI are taking up to 30 seconds to complete using Phalcon! I've spent days…
the-notable
  • 373
  • 2
  • 12
5
votes
3 answers

How to make models use defaults in Phalcon PHP Framework?

If a table has defaults on certain fields and NULL is not allowed, one would expect the insert script to use those defaults, as MariaDB/MySQL usually does. For example, if the table products has an AI field "id", a required field "name" and two…
Swader
  • 11,387
  • 14
  • 50
  • 84
5
votes
3 answers

Phalcon and cli applications

Is it possible to use phalcon in cli applications to handle requests with argv parameters? I want to use argv parameters to understand command that should be executed, e.g. ./script.php robot/create --color=red --feature=weapon and to get this…
avasin
  • 9,186
  • 18
  • 80
  • 127
5
votes
4 answers

Find entity by id column, \Phalcon\Mvc\Model::findFirst() gives incorrect result

Currently i have table with posts, each posts has an id. For a moment, only one posts exists, with id id = 92. if i execute following code, i will get not false, but post with id=92: $post = NewsPost::findFirst(['id' => 1]); var_dump($post->id); //…
avasin
  • 9,186
  • 18
  • 80
  • 127
5
votes
3 answers

Translation facility in Phalcon

Does Phalcon provide any facility for multilingual web sites? What is best practice for developing an MVC phalcon based site? How should I implement view layer?
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
5
votes
3 answers

How do I use "Main Layout" views in a multi module Phalcon application?

I am using a "multi module" MVC structure for my PhalconPHP application. One issue I am trying to figure out is how I can configure my "Main Layout" view to be above the module view folders. In other words I want one master "Main Layout" (as…
Tim
  • 3,091
  • 9
  • 48
  • 64
5
votes
3 answers

How to add a 404 error code when route does not exisit?

How can I throw a 404 error code when a route does not exist? In phalcon after you set up your routing information - is there a way to check to see if a route coming in (from the user) matches any of the routes in your routes list? Then, if the…
user1697949
  • 97
  • 3
  • 10
5
votes
1 answer

How can I install the Phalcon Devtools

For the version 0.5.0 of Phalcon, how can I install the phalcon-devtools so that I can use them through the command shell?
Nikolaos Dimopoulos
  • 11,495
  • 6
  • 39
  • 67
4
votes
2 answers

phalcon query return Scanning error before

I'm using the phalcon framework, I want to execute this query public function updateAction($id) { $email = $this->request->getPost('email'); $check_email_unique = Users::find(['conditions' => 'id != ' .$id. ' AND email = '. $email]); echo…
Ahmad Abo Zaid
  • 340
  • 1
  • 16
4
votes
1 answer

Phalcon CLI task name

I have folder tasks with MainTask.php and SomeOtherTask.php files... How can I run only the SomeOtherTask? To run the main task I only need to write php cli.php , but I want some serious file name and not MainTask... Here is my other…
Alexandru Circus
  • 5,478
  • 7
  • 52
  • 89
4
votes
2 answers

How to Cache with QueryBuilder and Paginator in Phalcon?

I have a question about Cache in Phalcon. It is connected with Pagination and QueryBuilder. So, i will give u example: $builder = $this->modelsManager->createBuilder() ->columns('a.*, m.*') ->addFrom('Models\Articles', 'a') …
Boris Delev
  • 424
  • 3
  • 16