News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Robert Basic's Blog:
Importing Symfony2 security settings from a bundle
August 25, 2011 @ 11:58:40

In a new post to his blog Robert Basic takes a brief look at importing Symfony2 security settings from a bundle he's been creating back into the main configuration.

I started to work on/figuring out the security part in Symfony2 and one part where the docs fail so far is to explain how to import security settings from a bundle. Once I put some thinking into it, it's pretty easy actually. Simply import the needed security file in your main config file.

His trick is to use the "imports" key in his YAML config file to define the resource to pull from in his config.xml. More information on the format of the security file can be found here in the Symfony documentation. It helps you define authentication mechanisms, authorization models and working with access control and roles.

0 comments voice your opinion now!
import security setting symfoyny2 bundle configuration resource


Lorna Mitchell's Blog:
Github to Jira Bug Migration Script
March 09, 2011 @ 10:18:18

As part of a migration the Joind.in project made to track their bugs on a hosted Jira instance instead of the Issue Tracker on Github, Lorna Mitchell, one of the leads on the project has written up an import script she used to move current issues. The code is in her latest post.

I migrated only our open issues, and comments (and the comments ended up a bit weirdly formatted on the other end but this was the best they could do). It was nothing pretty or clever but in case it's useful to someone else.

The script connects to the github API and pulls down the information for the open issues including their titles, user and body of the issue. This is then used to make another connection for each to fetch their comments. The whole thing is dumped out to a CSV file that can be easily imported by the Jira team.

0 comments voice your opinion now!
github jira import issue list bug migrate csv api


Lorna Mitchell's Blog:
3 Ways to Access a Namespaced PHP Class
November 29, 2010 @ 12:49:36

Lorna Mitchell has posted three different ways you can use to get access to a namespaced class in a PHP 5.3 application, all useful depending on where you are in the application and your needs.

After what felt like years of debate over the notation to use for PHP's namespaces, it seems like the feature itself has had relatively little use or attention since it was actually implemented in PHP 5.3. We're all used to working without it but using it does make code neater.

Her three options are:

  • Refer Namespace and Class Name
  • Import the Namespace
  • Alias the Namespace and/or Class

You can find out more about namespaces in PHP applications on the PHP manual.

0 comments voice your opinion now!
namespace access method example import alias class


ThinkPHP.de:
Import and export data using PHPExcel
July 15, 2010 @ 10:21:12

On the ThinkPHP blog today there's a new post looking at their experience with PHPExcel to open, modify, save, etc Microsoft Excel files directly from PHP.

EAR's Spreadsheet_Excel_Writer combined with the project Spreadsheet_Excel_Reader on SourceForge was a good helper in the past - but only for BIFF5. BIFF8 support in spreadsheet excel writer has been a problem for a long time, and according to the authors, is still somewhat kludgy in the current version. So I needed an alternative. After a short research I stumbled upon PHPExcel which supports reading and writing of many formats in one API.

He lists some of these input and output formats and includes a simple example of how to use the tool. He creates a basic Excel file with a few different attributes (title, body, keywords) and show how to read in a document to extract the document's content.

0 comments voice your opinion now!
import phpexcel export tutorial excel microsoft


SitePoint Web Tech Blog:
Importing Content into Drupal
April 19, 2010 @ 11:23:22

On the SitePoint Web Tech blog there's a new post just for those looking to move their site(s) over to a Drupal installation - a quick technique for importing your information into a shiny new Drupal instance.

One of the most painful steps in any web system is importing content - especially so with Drupal. It is something that I have always dreaded. [...] That is all in the past. I am happy now. I recently discovered a module that is a crown jewel in the Drupal Contrib community - Feeds.

With the Feeds module you can directly pull the information in from the feeds your site already provides (or ones you could whip up quickly) and pull it directly into your new site - even CSV content will work.

0 comments voice your opinion now!
drupal import content tutorial feeds module


Sameer Borate's Blog:
Simulating Packages in PHP
November 05, 2009 @ 07:52:20

Sameer Borate has a new post to his blog looking at the idea of simulating the idea of packages that several other languages have (like Java) with similar functionality to use them.

Most modern languages have a concept of packages, wherein related classes are stored together. PHP sadly doesn't have a similar concept. [...] But in the spirit of 'programming into the language', what we can do is try to simulate a 'package-like' concept in PHP.

Wanting to stick with the "import()" function call, he's created a bit of sample code to mimic Java's loading method. The function more or less does what the auloading included in PHP can accomplish and he points out two issues with it - it doesn't really do a real "import" just an include and that, how it stands, you cannot tell what order the files will be included in (no sorting at all).

0 comments voice your opinion now!
import package simulate tutorial


SitePoint PHP Blog:
How to Use PHP Namespaces (Parts 2 &3)
July 15, 2009 @ 08:16:24

The SitePoint PHP blog has posted the next two parts of their series looking at using namespaces in PHP - parts 2 and 3:

In the second part of the series they build on the basics and look at importing namespaces into a script, aliasing them to a shorter, easier to use name and some rules to consider about name resolution.

The third part of the series (the last part) looks at the keywords the namespace functionality uses and how to autoload namespaced classes to keep their namespacing intact.

0 comments voice your opinion now!
autoload keyword alias import tutorial namespace


Rob Allen's Blog:
Zend Framework URL Rewriting in IIS7
May 12, 2009 @ 08:47:44

As a part of his work being done on the WinPHP Challenge, Rob Allen has done some work with routing and Microsoft's IIS7 web server.

I've already covered the Sqlsrv adapter, so let's look at rewriting requests with IIS7's URL Rewrite module. As with everything in IIS, you get at this tool via the IIS Manager GUI. Be aware though that the Url Rewrite icon is available at server level and at the website level.

The module allows you to define rules similar to mod_rewrite with Apache and even lets you import them from a current installation. The "Import Rules" panel lets you either specify a configuration file to pull from or lets you cut and paste the rules in for import (as seen here).

0 comments voice your opinion now!
zendframework application microsoft iis7 modrewrite urlrewrite module import


Robert Basic's Blog:
LAMP and SVN on Ubuntu 8.10
November 25, 2008 @ 07:59:59

In this new post Robert Basic expands on an older post about installing LAMP on a Ubuntu system by tossing Subversion (SVN) into the mix.

This post is a rewrite of one of my older posts, Ubuntu as a dev machine, but this time I'll explain also how to setup a basic SVN besides the LAMP. [...] Once again, I'm installing it under VirtualBox (VB).

He includes all of the apt-get commands you'll need as well as configuration options and commands to get your first project imported into subversion.

0 comments voice your opinion now!
lamp ubuntu subversion svn aptget command configure import


Christian Weiske's Blog:
Importing huge XML files using PHP5 - efficiently and conveniently
August 25, 2008 @ 09:34:38

Christian Weiske has a quick tip on how to get larger XML files to pull into PHP5 and be usable:

At work I had the task to implement the synchronization between an online shop and a commodity management system. Data exchange format was XML - one big XML file for all of the products (some thousands with dozens of attributes). Big question: How do I import the file in a way that is most convenient for me as a programmer - and without exceeding the machine's RAM when loading a 1 GiB file?

The newer alternatives both use the same technology (DOM and SimpleXML - with DOM behind it) so he goes more "low tech" than that and opts for the XMLReader extension to pull in the large amounts of data. Available in PHP5, the XMLReader extension, which he combines with an Iterator from the SPL to makes for a simple, quick little parser.

0 comments voice your opinion now!
import xml file php5 efficient convenient xmlreader spl iterator



Community Events











Don't see your event here?
Let us know!


hhvm language hack component framework code opinion security application symfony2 facebook unittest introduction release podcast install package overview composer example

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework