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

Phalcon PHP Password Bcrypt

So, I have setup in my di, the security component, as such... --services.php-- $di->set('security', function(){ $security = new Phalcon\Security(); //Set the password hashing factor to 11 rounds $security->setWorkFactor(11); return…
Justin E
  • 1,252
  • 16
  • 30
4
votes
3 answers

Phalcon tutorial error PhalconException: TestController handler class cannot be loaded

I'm having some trouble getting Phalcon Tutorial 1 to work. In the end I've cloned the version of it onGithub to make sure I'm not missing something; still getting the same behavior from that. Pointing the browser to localhost/test as shown in the…
MHG
  • 1,410
  • 3
  • 19
  • 32
4
votes
1 answer

How do Lucene/Sphinx/Solr work?

I have a website in Phalcon and I'm trying to add a search engine to it. The content, however, is not in a DB and is in flat files.. located in app/views/. I've never implemented a search engine, but from what I gather it seems like Lucene or…
meder omuraliev
  • 183,342
  • 71
  • 393
  • 434
4
votes
3 answers

Using MVC frameworks for front-end and back-end

I'm a bit confused on how to develop a web application using frameworks on both front-end (e.g. Angular) and back-end (e.g. Phalcon). Phalcon's documentation has bits like: Hello!"; echo Phalcon\Tag::linkTo("signup", "Sign Up…
CaptSaltyJack
  • 15,283
  • 17
  • 70
  • 99
4
votes
1 answer

How to configure Phalcon in the Nginx config file

I am trying to set up an NGINx server to work with Phalcon PHP Framework. So far I've been looking for help on the internet but I could not find anything... My conf file is: server { #listen 80; ## listen for ipv4; this line is default and…
Lorenzo Verri
  • 143
  • 2
  • 2
  • 6
4
votes
1 answer

What is the difference between *.volt and *.phtml files in PhalconPHP?

Iin the sample projects of Phalcon, in the views directory we have some files with volt suffix and phtml suffix. What is the difference between this two suffix? When we must use Volt and when we must use phtml ?! please explain for me...
Omid Ebrahimi
  • 1,150
  • 2
  • 20
  • 38
4
votes
6 answers

Is it possible to render custom view (just custom .phtml) template with Phalcon\Mvc\View?

I need to render email templates in variable to send them later (which are stored in .phtml files), and i really don't want to implement my special class for handling this. Is it possible to render not controller action view, but custom one? I tried…
avasin
  • 9,186
  • 18
  • 80
  • 127
4
votes
5 answers

It is possible to get Phalcon\Mvc\View rendered output in variable?

I need to give back json object, that has property 'html' with rendered action. Is it possible to do natively with Phalcon vew? Example: $posts = NewsPost::find(['limit' => 10]); $view = new Phalcon\Mvc\View(); $view->setVar('posts',…
avasin
  • 9,186
  • 18
  • 80
  • 127
4
votes
4 answers

Functions and classes of PHP extentions in PhpStorm

Are functions of an extension fetch-able for an IDE like PHPStorm when they are given path to php.ini file of extension folder path? I saw that EasyPHP list functions of an extension beside it for those extension that are delivered with it, but it…
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
4
votes
1 answer

Is Phalcon UTF8 compliant?

I was wondering what is the internals of Phalcon using with regards to UTF8? For instance if I use something like this echo strlen('hello'); // output 5 However echo strlen('汉字/漢字'); // will output something like 10 strlen is not UTF8 compatible…
Nikolaos Dimopoulos
  • 11,495
  • 6
  • 39
  • 67
3
votes
2 answers

Phalcon 4 How to get URL of current page?

In phalcon 3.4 we had the below function to get the current URL, $current_url = $this->router->getRewriteUri(); However, it seems to be that, it was dropped in version 4.0 however there is no direct corresponding function for this i could find. Can…
mahen3d
  • 7,047
  • 13
  • 51
  • 103
3
votes
0 answers

Error installing phalcon 4.0.5 on php-fpm-alpine docker

When I try to make custom docker image with php:7.4.4-fpm-alpine and install phalcon 4.0.5 with pecl on it, there is an error on compiling phalcon creating libtool appending configuration tag "CXX" to libtool configure: patching…
3
votes
2 answers

PHP Xdebug debugging stops working in VSCode at first breakpoint

I am using Wamp on Windows 10 Pro 64bit. Firstly, PHP XDebug based debugging works fine on my normal Core PHP application in Visual Studio Code but when I start debugging a PhalconPhp (MVC) based application it stops at the first breakpoint and…
Amal
  • 41
  • 1
  • 6
3
votes
1 answer

PHP Startup: Unable to load dynamic library 'phalcon.so'

I am trying to run phalcon in php but it seems from the errors that it cannot load it. PHP Warning: PHP Startup: Unable to load dynamic library 'phalcon.so' (tried: /usr/lib64/php/modules/phalcon.so (/usr/lib64/php/modules/phalcon.so: undefined…
Waaaaat
  • 634
  • 3
  • 14
  • 29
3
votes
2 answers

PHP mb_substr issues with truncate text

I have a function that truncates texts as follows: public function truncateText($text, $val) { if(strlen($text) > $val){ $content = mb_substr($text, 0, $val) . '...'; return $content; } else { …
trix87
  • 175
  • 4
  • 16