Skip to content

rogerized/PearBundle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PearBundle

Install

git submodule add -f git://github.com/tumf/PearBundle.git vendor/bundles/Tumf/PearBundle
git submodule init
git submodule update

Register Bundle

 // app/AppKernel.php
 $bundles = array(
   new Tumf\PearBundle\PearBundle(),
 );

Add autoload

// app/autoload.php
$loader->registerNamespaces(array(
    // ...
    'Tumf\\PearBundle'      => __DIR__.'/../vendor/bundles',
    // ...
));
set_include_path(get_include_path() . PATH_SEPARATOR.__DIR__.'/../vendor/pear/php');

Usage

PEAR command wrapper.

  • pear:exec [.... ]
  • pear:init

example

setup pear

./app/console pear:init

discover pear channnel

./app/console pear channel-discover openpear.org

install Acme_Morningmusume from openpear

./app/console pear install openpear/Acme_Morningmusume

add autoload.php

$loader->registerPrefixes(array(
    //...
    'Acme_'                            => __DIR__.'/../vendor/pear/php',
));

use

$mm = new \Acme_MorningMusume;
var_dump($mm->members);

Configuraion

app/config/config.yml

pear:
  command: /path/to/pear

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%