Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Listopad, 2012

Dave Marshall: Silex Route Helpers for a Cleaner Architecture

Dave Marshall: Silex Route Helpers for a Cleaner Architecture

In a previous post of his Dave Marshall talked about using controllers as “services” in a Silex-based application. In this new post he takes it a step further and shows you how to use route helpers to make working with those controllers even simpler.

Supposing we want to render some HTML, do we want to inject the template engine in to the controller? Should the controller be responsible for knowing how to render the template? I’m not sure, but if I can have it not do it with minimal fuss, I think I’d rather it not. The full stack framework has the @Template annotation, which allows developers to assign a template to a controller and then simply return an array. If they can do it in the full stack framework, we can do it in Silex.

He includes the code for an example of a 404 handling page that uses the “convert” method to configure a route (path to a controller) for the currently matched route. He also shows the creation of a simple “CustomRoute” class and a “TemplateRenderingListener” to make it simpler to customize the handling and output of the request, all injected into the application’s DI for later use.

Source: http://www.phpdeveloper.org/news/18808

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Dave Marshall: Silex Route Helpers for a Cleaner Architecture

Dave Marshall: Silex Route Helpers for a Cleaner Architecture

In a previous post of his Dave Marshall talked about using controllers as “services” in a Silex-based application. In this new post he takes it a step further and shows you how to use route helpers to make working with those controllers even simpler.

Supposing we want to render some HTML, do we want to inject the template engine in to the controller? Should the controller be responsible for knowing how to render the template? I’m not sure, but if I can have it not do it with minimal fuss, I think I’d rather it not. The full stack framework has the @Template annotation, which allows developers to assign a template to a controller and then simply return an array. If they can do it in the full stack framework, we can do it in Silex.

He includes the code for an example of a 404 handling page that uses the “convert” method to configure a route (path to a controller) for the currently matched route. He also shows the creation of a simple “CustomRoute” class and a “TemplateRenderingListener” to make it simpler to customize the handling and output of the request, all injected into the application’s DI for later use.

Source: http://www.phpdeveloper.org/news/18808

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPMaster.com: PHPFog is Coming to an End – But Don’t Panic!

PHPMaster.com: PHPFog is Coming to an End – But Don’t Panic!

If you’re a PHPFog user, you know that they’re discontinuing the service in favor of their AppFog product. If you’re looking to migrate over to this from PHPFog, you should check out this new article from PHPMaster.com with some of the differences between the two services.

Have you heard PHPFog is coming to an end? No, well – it is. That’s right, in a recent announcement on their mailing list, the company has said that PHPFog will be no more by the end of January, 2013. But if you’re on their platform, don’t panic! The new, combined platform may be even better than what you’re accustomed to with them now.

He talks about some of the things that are different including the technologies it employs, addons it provides, the differing deployment process and when teh final cut-off date is. He links to their own migration guide for most of the steps but mentions one specific change that might trip you up – the change to store connection information in the “VCAP_SERVICES” environment variable.

Source: http://www.phpdeveloper.org/news/18807

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPMaster.com: PHPFog is Coming to an End – But Don’t Panic!

PHPMaster.com: PHPFog is Coming to an End – But Don’t Panic!

If you’re a PHPFog user, you know that they’re discontinuing the service in favor of their AppFog product. If you’re looking to migrate over to this from PHPFog, you should check out this new article from PHPMaster.com with some of the differences between the two services.

Have you heard PHPFog is coming to an end? No, well – it is. That’s right, in a recent announcement on their mailing list, the company has said that PHPFog will be no more by the end of January, 2013. But if you’re on their platform, don’t panic! The new, combined platform may be even better than what you’re accustomed to with them now.

He talks about some of the things that are different including the technologies it employs, addons it provides, the differing deployment process and when teh final cut-off date is. He links to their own migration guide for most of the steps but mentions one specific change that might trip you up – the change to store connection information in the “VCAP_SERVICES” environment variable.

Source: http://www.phpdeveloper.org/news/18807

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Packagist Latest Releases for 11.27.2012

Community News: Packagist Latest Releases for 11.27.2012Recent releases from the Packagist:

Source: http://www.phpdeveloper.org/news/18805

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Packagist Latest Releases for 11.27.2012

Community News: Packagist Latest Releases for 11.27.2012Recent releases from the Packagist:

Source: http://www.phpdeveloper.org/news/18805

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Latest PECL Releases for 11.27.2012

Community News: Latest PECL Releases for 11.27.2012Latest PECL Releases:

Source: http://www.phpdeveloper.org/news/18806

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Latest PECL Releases for 11.27.2012

Community News: Latest PECL Releases for 11.27.2012Latest PECL Releases:

Source: http://www.phpdeveloper.org/news/18806

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Symfony Blog: A full track dedicated to Symfony at SunshinePHP conference

Symfony Blog: A full track dedicated to Symfony at SunshinePHP conference

On the Symfony blog they talk about the SunshinePHP Conference (happening in Miami, February 8th and 9th) and it’s dedicated Symfony track.

The SunshinePHP conference will take place in M-I-A-M-I, what a cool place for a Symfony conference during cold winter time! Save the date, on February 8th & 9th, you can register for two days of Symfony sessions, making this the first Symfony event on the east coast of the USA. The Call for Papers is still open, so do not hesitate to submit a talk about Symfony.

The conference isn’t just limited to Symfony sessions either – you can submit on whatever web or PHP-related topics you might like to present. Hurry though, because the Call for Papers ends in less than a week (on December 1st)! For more information about the event or to get your Early Bird tickets (just $159 USD) head over to the main conference site.

Source: http://www.phpdeveloper.org/news/18804

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Symfony Blog: A full track dedicated to Symfony at SunshinePHP conference

Symfony Blog: A full track dedicated to Symfony at SunshinePHP conference

On the Symfony blog they talk about the SunshinePHP Conference (happening in Miami, February 8th and 9th) and it’s dedicated Symfony track.

The SunshinePHP conference will take place in M-I-A-M-I, what a cool place for a Symfony conference during cold winter time! Save the date, on February 8th & 9th, you can register for two days of Symfony sessions, making this the first Symfony event on the east coast of the USA. The Call for Papers is still open, so do not hesitate to submit a talk about Symfony.

The conference isn’t just limited to Symfony sessions either – you can submit on whatever web or PHP-related topics you might like to present. Hurry though, because the Call for Papers ends in less than a week (on December 1st)! For more information about the event or to get your Early Bird tickets (just $159 USD) head over to the main conference site.

Source: http://www.phpdeveloper.org/news/18804

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>