background preloader

16. The QueryBuilder — Doctrine 2 ORM 2 documentation

16. The QueryBuilder — Doctrine 2 ORM 2 documentation
A QueryBuilder provides an API that is designed for conditionally constructing a DQL query in several steps. It provides a set of classes and methods that is able to programmatically build queries, and also provides a fluent API. This means that you can change between one methodology to the other as you want, and also pick one if you prefer. 16.1. Constructing a new QueryBuilder object The same way you build a normal Query, you build a QueryBuilder object, just providing the correct method name. <? Once you have created an instance of QueryBuilder, it provides a set of useful informative functions that you can use. <? There’re currently 3 possible return values for getType(): QueryBuilder::SELECT, which returns value 0QueryBuilder::DELETE, returning value 1QueryBuilder::UPDATE, which returns value 2 It is possible to retrieve the associated EntityManager of the current QueryBuilder, its DQL and also a Query object when you finish building your DQL. <? 16.2. 16.2.1. <? <? 16.2.2. <? <? <? <? 16.2.3. Related:  Symfony 2symfony

Installing Node.js via package manager · joyent/node Wiki Note: The packages on this page are maintained and supported by their respective packagers, not the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream. Debian and Ubuntu based Linux distributions NOTE: Temporary info before full update of this wiki page Below is not an up-to-date info. Also including: Linux Mint, Linux Mint Debian Edition (LMDE), elementaryOS and others. Node.js is available from the NodeSource Debian and Ubuntu binary distributions repository (formerly Chris Lea's Launchpad PPA). Setup with Ubuntu: curl -sL | sudo bash - Then install with Ubuntu: sudo apt-get install -y nodejs Setup with Debian (as root): apt-get install curl curl -sL | bash - Then install with Debian (as root): apt-get install -y nodejs Optional: install build tools apt-get install -y build-essential Alternatives

Symfony 2 : développez votre site avec un framework PHP - Developpeur / integrateur web (Growth Hacker) Voici un prise de note rapide que j’ai pu réaliser durant la lecture du livre « Développez votre site web avec le framework SYMFONY 2 » (de Alexandre BACCO). Le livre est disponible à l’achat ou accessible gratuitement en ligne. Symfony 2 est un framework très puissant permettant de réaliser des sites robustes (structure MVC, template twig, ligne de commande, …), bref une solution à adopter au plus vite sur vos futurs projets. (Attention le temps d’apprentissage reste assez long sur ce type de framework). CONTROLLER : $this->getRequest() equivalent $this->get(‘request’); RECUP VAR DE L’URL ( $request = $this->getRequest(); $tag = $request->query->get(‘tag’); LISTE : getRequest() Variables URL ($_GET) : $request->query Variables Form ($_POST) : $request->request Variables Cookie ($_COOKIE) : $request->cookies Variables Serveur ($_SERVER) : $request->server Variables d’Entete ($_SERVER[‘HTTP_*’] : $request->headers Paramètres de route : $request->attributes CONTROLLER : Response

OptimizePress — The New Way To Create Marketing Sites Incenteev/ParameterHandler WishList Member | Membership Site Software Adding HWIOAuthBundle to your Symfony2 project When it comes the time to add OAuth support to your Symfony2 project, and allow your users to login using their accounts of Facebook, Google, Twitter, Linkedin, etc., it really makes sense to use some of those great third-party bundles that already solve this problem. One of these bundles is the HWIOAuthBundle. This is a great bundle that allows you very easily to add support for authenticating users via OAuth1.0a or OAuth2 in Symfony2, handling more than 20 providers. But as today, there is only a little problem… documentation is not as detailed as some may want. When installing and testing a new S2 bundle, almost always I do it the same way: testing the most simple example I can, and make it work, so I can start refactoring and adding complexity later. All bundles come with their respective documentation, with instructions on how to install, configure and use it. So here it goes my example: Setting up the bundle First of all, you need to add the bundle to your composer.json file. OMG!

Planifier une sauvegarde automatique sous WordPress (FTP + MySQL) Planifier des sauvegardes intégrales sous WordPress tel est l’objectif de ce tutoriel. Nous utiliserons l’excellent plugin BackWPup pour sauvegarder votre base de données MySQL ainsi que votre serveur FTP qui stocke les thèmes, les plugins ou encore vos médias. Cette solution technique est relativement simple à mettre en œuvre, car il vaut mieux prévenir que guérir en cas de panne ou de piratage. Le principal intérêt d’un plugin comme BackWPup est sa capacité à automatiser le processus de maintenance : de la création du fichier compressé à son rapatriement sur un serveur FTP, tout peut être automatisé. On appréciera également le fait de ne pas dépendre d’un service de stockage en ligne dont les restrictions et les clauses de confidentialité posent de nombreux soucis. Votre site est votre bien le plus précieux : qu’il reste chez vous ! Étape n°1 – Création d’une nouvelle opération de sauvegarde via BackWPup BackWPup Plugin de sauvegarde complet pour WordPress. Type d’opération

Installing and Configuring Symfony (The Symfony Book) The goal of this chapter is to get you up and running with a working application built on top of Symfony. In order to simplify the process of creating new applications, Symfony provides an installer application. Installing the Symfony Installer Using the Symfony Installer is the only recommended way to create new Symfony applications. Depending on your operating system, the installer must be installed in different ways. Linux and Mac OS X Systems Open your command console and execute the following commands: This will create a global symfony command in your system. Windows Systems Open your command console and execute the following command: Then, move the downloaded symfony file to your project's directory and execute it as follows: Creating the Symfony Application Once the Symfony Installer is available, create your first Symfony application with the new command: Tip For security reasons, all Symfony versions are digitally signed before distributing them. Running the Symfony Application Note

Related: