Questions tagged [auraphp]
The Aura Project for PHP is a set of well-tested and fully decoupled components libraries.
20
questions
0
votes
1
answer
44
views
How to Send a GET variable to a controller using PHP AURA ROUTER and ZEND DIACTOROS
I'm coding my first MVC PHP APP without any framework only common PHP Libraries, nonetheless, I'm having some problems with the process of sending GET Variables to the Controller, without using the ...
2
votes
1
answer
36
views
How to containerize a builder class in Aura.Di?
Without a DI container, you would normally do something like this:
$foo = (new FooBuilder)
->setA('a')
->setB('b')
->build();
// where $foo becomes an instance of Foo class
How do you ...
0
votes
1
answer
29
views
How can I invoke a controller with respective method is Aura Router?
Based on the documentation of Aura Router, in order to define a new path (e.g. for GET method), we can use this code snippet:
$map->get('blog.read', '/blog/{classname}/{method}/{param}', function ...
1
vote
1
answer
198
views
Using Aura router with Aura dispatcher
Is there any sample/tutorial working with both Aura router and dispatcher? I found a sample code on the documentation page:
// dispatch the request to the route handler.
// (consider using https://...
1
vote
1
answer
140
views
Do I need to define a container inside a class for dependency injection?
I am learning Auraphp Di, and I want to write sample code. Suppose I have these files:
public/index.php:
use Aura\Di\ContainerBuilder;
use MyPackage\Component\Authentication\AuthenticateFlow;
...
0
votes
1
answer
41
views
Am I using Auraphp in the right way for dependency injection?
I started playing with Auraphp for dependency injection, and I wrote a sample application. It is working as expected, however, I am not sure if I use it in the correct way. Can someone let me know if ...
0
votes
1
answer
134
views
Aura Router AJAX Route Failure - Route Not Found
To preface this question, I'm converting a demo application to utilize RESTful, SEO-friendly URLs; EVERY route with the exception of one of two routes used for AJAX requests works when being used in ...
1
vote
1
answer
61
views
How to use Aura Dependency Injector (Aura.Di 3.x)?
I'm just trying a very simple test
<?php
require 'vendor/autoload.php';
class Blog
{
public function post ()
{
return 'ok';
}
}
$builder = new \Aura\Di\ContainerBuilder();
$...
0
votes
1
answer
39
views
How to set session time in Auraphp's AuthFactory?
I've tried to set the session cookies in Aura AuthFactory in multiple places over the last few months. I can't seem to find the right place, and I can't find a single bit of documentation how to set ...
0
votes
1
answer
809
views
Use php array as parameter for Postgres IN clause
I am trying to bind a PHP array as argument for a SQL stmt. I am using auraSQL extended PDO so it looks like this:
$php_array = ['first', 'second', 'third']
$db->fetchColumn("SELECT * FROM ...
1
vote
1
answer
185
views
Dependency Injection : DIY Container or Framework?
I've been doing a lot of reading on dependency injection over the last few days and have been using Aura.DI to have a play with IoC principles. I've come up against a few issues I've heard are common ...
0
votes
1
answer
82
views
How to create an Aura DI container?
I installed a composer, downloaded the Aura, created an index.pxp and wrote in it:
require('vendor/autoload.php');
use Aura\Di\ContainerBuilder;
$builder = new ContainerBuilder();
$di = $builder->...
0
votes
1
answer
104
views
AuraPHP router not picking up parameters
I'm trying to get the current version of the Aura router working with nginx.
I'm using the nginx config from the documentation and trying to get the closure route from https://github.com/auraphp/Aura....
1
vote
1
answer
166
views
AuraPHP DI dynamic class or decision based injection
I'm new to modern method of dependency injection and I'm trying to figure out how to have a method pick which class to use based on a condition. I bet I've got my design structure off but I'm also not ...
0
votes
1
answer
398
views
How Can I use PSR7 Middlewares in PHP
I've installed the following composer packages:
"require": {
"beatswitch/lock": "0.2.0",
"league/event": "2.1.2",
"oscarotero/psr7-middlewares": "v3.16.1",
"pdepend/pdepend": "2.2.4",
"sebastian/...
1
vote
2
answers
471
views
Variable binding in aura/sqlquery when using mysqli_* connection
I've got a legacy app that uses mysqli_*() functions (actually, it uses mysql_*() functions. Gah!). I am using aura/sqlquery as a SQL query generator. For example:
$queryFactory = new Aura\SqlQuery\...
3
votes
2
answers
459
views
CakePHP i18n __ function returns array
I'm running into a problem with the __ function, and I'm not sure whether it's a bug in Cake (3.2.8), Aura\Intl, or my code. I've tried the same thing in Cake 1.3, and it works as I expect it to, but ...
0
votes
1
answer
212
views
PHP (AuraPHP router) - routing with more than one optional parameters
i have got a little problem in my auraphp router. For example i have this URL : oleje/134/motorove-oleje-pro-automobily/
But i can have this URl also : oleje/134/motorove-oleje-pro-automobily/oleje-...
1
vote
1
answer
515
views
mysql_num_rows equivalent in aura sql
Hi am using Aura sql to perform querying. What is the equivalent function for mysql_num_rows in aura sql.
I have to check:
if(mysql_num_rows($query)==1)
// do something
else
// do something
For ...
4
votes
3
answers
7k
views
PHP 5.4 Built in Server, Fix file not found error
I am using PHP 5.4 RC5, and starting the server via terminal
php -S localhost:8000
Currently using Aura.Router , and at the root I have index.php file with code
<?php
$map = require '/Aura....