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

property does not have a setter

I am using a PHP / phalcon app. I have 2 copies. In server 1, I have no problems. In Server 2 (Same Code) I getting the following error. property '' does not have a setter Since I have same code I am confused what to do here. I looked…
masterFly
  • 1,072
  • 12
  • 24
0
votes
0 answers

Phalcon: Cookie-> set not working when calling a route using file_get_contents?

Setting cookie functionality is not working when I'm calling a route fro PHP filegetcontents method? and It's working with jQuery $.ajax. What is the mistake i've done? Please help me to solve this. Route: $api->addGet('/setmycookie/{cookievalue}',…
0
votes
1 answer

Phalcon fire event from controller

I am using the Phalcon micro application as my REST web service. I want to add an event to the application and fire this event from different places like controllers. For example; if a user registers, the controller should fire a userRegistered…
Ali
  • 443
  • 5
  • 22
0
votes
2 answers

Phalcon validate field depends on another fields

I using Phalcon framework, i have a Collection Model, in validate() function of this model, i validate my fields like below: class Users extends Collection { public function validation() { $this->validate( new…
Ali
  • 443
  • 5
  • 22
0
votes
1 answer

PhalconPHP. Render volt template to variable

I'd like to generate html code from volt template to variable. How to do this? $this->view->pick('foo/bar'); $this->view->setVar('foo', $bar); $html = $this->view->???
Robin71
  • 383
  • 5
  • 26
0
votes
1 answer

Phalcon PDO transaction is not working correct

It nearly took me a whole day to resolve the problems about transactions, but I failed. My requirement is INSERT a new record both in table topic and table topic_data in one transaction. I have my code like this : // database connection $di->set(…
LCB
  • 971
  • 9
  • 22
0
votes
1 answer

Phalcon transaction not working correct

I created a transaction like this : $this->db->begin(); $topic = new Topic(); $topic->assign( $data ); $topic->save(); var_dump( $this->db->isUnderTransaction() ); // bool(true) $this->db->rollback(); var_dump( $this->db->isUnderTransaction() );…
LCB
  • 971
  • 9
  • 22
0
votes
2 answers

php phalcon phql update

I am new to phalcon framework.I would like to update data from phalcon model update method. $sql = "UPDATE table SET col1='1',col2 = NULL WHERE 1"; to > $all = model::findFirst(); > $all->col1 = '1'; > $all->col2=…
0
votes
1 answer

AngularJs vs Laravel. What to pick?

I am developing a web, iOS and Android app simultaneously. I have setted up phalcon that connects to Cassandra database and it is used for an API gateway. All requests are HTTP and nothing connects directly to Cassandra everything is filtered in…
0
votes
1 answer

Mixing Named params with standard params Phalcon

I have a url that loads fonts as such: /templatename/fonts/helvetica?weights=regular,bold,light in php it will dynamically generate a CSS file with the appropriate font referencing. We just recently moved over to to Phalcon and it broke. I'm trying…
Philll_t
  • 4,267
  • 5
  • 45
  • 59
0
votes
1 answer

Implementation for API using Application Context - Phalcon

I am having a bit of difficulty understanding how I can implement an API in a separate directory using an Application type object instead of an Micro. Currently when I try to implement: $application->get('/api/robots', function () { }); within my…
David Biga
  • 2,763
  • 8
  • 38
  • 61
0
votes
1 answer

Phalcon PHQL GROUP BY error

When adding GROUP BY to my query, Phalcon is giving me an error - Phalcon\Mvc\Model\Exception: Syntax error, unexpected token GROUP, near to ' BY... Here's my code; $phql = " SELECT $dist $ads_model.id AS id, $ads_model.title AS title,…
Ally
  • 955
  • 1
  • 15
  • 33
0
votes
1 answer

How to create dynamic routing in phalcon?

I have read the documentation of phalcon routing and cannot find the one like i needed. /{param1}/{param2}/{param3}/controllerName/actionName/{param4} Help me guys.
0
votes
1 answer

Deny acces of private area Phalcon PHP ACL

I would like to deny access to the private areas on my website. But I don't know what I am doing wrong. I don't want to use Acl::DENY as the default rule. Instead I am using Acl::ALLOW as the global rule and denying access to the private…
Falundrim
  • 63
  • 6
0
votes
0 answers

Installing CPhalcon on an AWS Docker image

I have a docker image that installs phalcon onto a Docker image. Here is the Dockerfile: FROM ubuntu:trusty MAINTAINER Fernando Mayo , Feng Honglin # Install packages ENV DEBIAN_FRONTEND noninteractive RUN…