Questions tagged [auraphp]

The Aura Project for PHP is a set of well-tested and fully decoupled components libraries.

The Aura project centers around a collection of independent packages. Each package is self-contained and has only the things it needs for its core purpose. None of the packages depends on any of the other.

20 questions
4
votes
3 answers

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 add('home',…
Hari K T
  • 4,174
  • 3
  • 32
  • 51
3
votes
2 answers

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 it's possible that my expectations are simply…
Greg Schmidt
  • 5,010
  • 2
  • 14
  • 35
2
votes
1 answer

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 register/containerize something like that in Aura.Di?
IMB
  • 15,163
  • 19
  • 82
  • 140
1
vote
1 answer

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://github.com/auraphp/Aura.Dispatcher // in place of…
Belkin
  • 199
  • 15
1
vote
1 answer

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; require_once dirname(__DIR__) .…
Belkin
  • 199
  • 15
1
vote
1 answer

How to use Aura Dependency Injector (Aura.Di 3.x)?

I'm just trying a very simple test newInstance('Blog'); echo…
IMB
  • 15,163
  • 19
  • 82
  • 140
1
vote
1 answer

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 when implementing this pattern, but I'm still not…
jdoe1
  • 11
  • 2
1
vote
1 answer

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 seeing how to do this in Aura DI through the…
David Fairbanks
  • 638
  • 7
  • 17
1
vote
2 answers

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\QueryFactory('mysql'); $select =…
David Weinraub
  • 14,144
  • 4
  • 42
  • 64
1
vote
1 answer

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 this i need the equivalent function in Aura.Sql.
Deepu Sasidharan
  • 5,193
  • 10
  • 40
  • 97
0
votes
1 answer

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 superglobal $_GET. I am using Aurora Router to map…
0
votes
1 answer

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 ($request) { $className =…
Belkin
  • 199
  • 15
0
votes
1 answer

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 I am doing right, or is there any better way to…
Belkin
  • 199
  • 15
0
votes
1 answer

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 the application on the web, and ALL the routes…
Doktor13
  • 41
  • 1
  • 6
0
votes
1 answer

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 the session timeout. Can anyone point me in the…
Tim Caviness
  • 43
  • 1
  • 7
1
2