php - How to include stripe client api with symfony2. How to include files with no classes in symfony2 -


i'm trying include file in symfony2 project file bunch of require statements. unfortunately this, file doesn't contain class. don't want manually write namespaces included file contain classes need wondering how can include file in way include other files need. file i'm trying include symfony2 looks :

<?php  // tested on php 5.2, 5.3  // snippet (and of curl code) due facebook sdk. if (!function_exists('curl_init')) {   throw new exception('stripe needs curl php extension.'); } if (!function_exists('json_decode')) {   throw new exception('stripe needs json php extension.'); } if (!function_exists('mb_detect_encoding')) {   throw new exception('stripe needs multibyte string php extension.'); }  // stripe singleton require(dirname(__file__) . '/stripe/stripe.php');  // utilities require(dirname(__file__) . '/stripe/util.php'); require(dirname(__file__) . '/stripe/util/set.php');  // errors require(dirname(__file__) . '/stripe/error.php'); require(dirname(__file__) . '/stripe/apierror.php'); require(dirname(__file__) . '/stripe/apiconnectionerror.php'); require(dirname(__file__) . '/stripe/authenticationerror.php'); require(dirname(__file__) . '/stripe/carderror.php'); require(dirname(__file__) . '/stripe/invalidrequesterror.php');  // plumbing require(dirname(__file__) . '/stripe/object.php'); require(dirname(__file__) . '/stripe/apirequestor.php'); require(dirname(__file__) . '/stripe/apiresource.php'); require(dirname(__file__) . '/stripe/singletonapiresource.php'); require(dirname(__file__) . '/stripe/list.php');  // stripe api resources require(dirname(__file__) . '/stripe/account.php'); require(dirname(__file__) . '/stripe/card.php'); require(dirname(__file__) . '/stripe/charge.php'); require(dirname(__file__) . '/stripe/customer.php'); require(dirname(__file__) . '/stripe/invoice.php'); require(dirname(__file__) . '/stripe/invoiceitem.php'); require(dirname(__file__) . '/stripe/plan.php'); require(dirname(__file__) . '/stripe/token.php'); require(dirname(__file__) . '/stripe/coupon.php'); require(dirname(__file__) . '/stripe/event.php'); require(dirname(__file__) . '/stripe/transfer.php'); require(dirname(__file__) . '/stripe/recipient.php'); 

i found stripe on packagist :)

{     "require": {         "stripe/stripe-php": "1.8.*"     } } 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -