SOA

Loading...
OpenSourceSoftware (http://www.oss.io) Users (/users?ref=top_menu_link)

(Python)

Top Projects (/open-source/?ref=top_menu_link)

Languages

About (/about)

Join (/register)

Coderockr/SOA

Join 10350+ others. No

Coderockr (/user2/Coderockr) / 24 SOA (/p/Coderockr/SOA) (/p/Coderockr/SOA/stargazers) (https://github.com/Coderockr/SOA)

spamming. I promise! Follow us at github.

FOLLOW

(https://github.com/bcambel/hackersome?

Silex Controller Provider to provide SOA access to Doctrine entities and services

228

Follow @pythonhackers

0 (/p/Coderockr/SOA/contributors)

PHP

ref=left_menu_link) Star

0 (/p/Coderockr/SOA/watchers)

2,251 followers

READ ME

Contributors (/p/Coderockr/SOA/contributors)

How to use Watchers

bootstrap.php

(/p/Coderockr/SOA/watchers)


Stargazers (/p/Coderockr/SOA/stargazers)

Doctrine\ORM\Configuration, Doctrine\Common\Cache\ArrayCache as Cache, Doctrine\Common\Annotations\AnnotationRegistry, Doctrine\Common\Annotations\AnnotationReader, Doctrine\Common\ClassLoader;

Related Projects

$loader = require __DIR__.'/vendor/autoload.php'; $loader->add('Skel', __DIR__.'/src');

//doctrine $config = new Configuration(); //$cache = new Cache(); $cache = new \Doctrine\Common\Cache\ApcCache(); $config->setQueryCacheImpl($cache); $config->setProxyDir('/tmp'); $config->setProxyNamespace('EntityProxy'); $config->setAutoGenerateProxyClasses(true); //mapping (example uses annotations, could be any of XML/YAML or plain PHP) AnnotationRegistry::registerFile(__DIR__. DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'doctrine' . DIRECTORY_SE PARATOR . 'orm' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEP ARATOR . 'Doctrine' . DIRECTORY_SEPARATOR . 'ORM' . DIRECTORY _SEPARATOR . 'Mapping' . DIRECTORY_SEPARATOR . 'Driver' . DIR ECTORY_SEPARATOR . 'DoctrineAnnotations.php');

\Doctrine\Common\Annotations\AnnotationRegistry::registerFile ( __DIR__ . '/vendor/jms/serializer/src/JMS/Serializer/Anno tation/Type.php' );

$driver = new Doctrine\ORM\Mapping\Driver\AnnotationDriver( new Doctrine\Common\Annotations\AnnotationReader(), array(__DIR__.'/src/Skel/Model') ); $config->setMetadataDriverImpl($driver); $config->setMetadataCacheImpl($cache);

app.php
use Silex\Application, Silex\Provider\DoctrineServiceProvider, Symfony\Component\HttpFoundation\Request, Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvide r;

use Symfony\Component\HttpFoundation\Response; use Coderockr\SOA\RestControllerProvider;

$app = new Application();

//configuration $app->register(new Silex\Provider\SessionServiceProvider());

//getting the EntityManager $app->register(new DoctrineServiceProvider, array( 'db.options' => array( 'driver' => 'pdo_mysql', 'host' => 'localhost', 'port' => '3306', 'user' => 'skel', 'password' => 'skel', 'dbname' => 'skel' ) ));

$app->register(new DoctrineOrmServiceProvider(), array( 'orm.proxies_dir' => '/tmp/' . getenv('APPLICATION_ENV'), 'orm.em.options' => array( 'mappings' => array( array( 'type' => 'annotation', 'use_simple_annotation_reader' => false, 'namespace' => 'Skel\Model', 'path' => __DIR__ . '/src' ) ) ), 'orm.proxies_namespace' => 'EntityProxy', 'orm.auto_generate_proxies' => true ));

$api = new RestControllerProvider(); $api->setCache($cache); //Doctrine cache, created in bootstra p.php $api->setEntityNamespace('Skel\Model'); //you can set authorization and authentication classes //$api->setAuthenticationService(new \Skel\Service\Authentica tionService); //$api->setAuthorizationService(new \Skel\Service\Authorizati onService); $app->mount('/api', $api);

$rpc = new RpcControllerProvider(); $rpc->setCache($cache); //Doctrine cache, created in bootstra p.php $rpc->setServiceNamespace('Skel\Service'); //you can set authorization and authentication classes //$api->setAuthenticationService(new \Skel\Service\Authentica tionService); //$api->setAuthorizationService(new \Skel\Service\Authorizati onService); $app->mount('/rpc', $rpc);

How to use Rest How to use filter? http://skel.dev/api/v1/user?filter=name:like:%elton%,password :eq:teste

This will query for name LIKE %elton% and password = teste

How to use joins? http://skel.dev/api/v1/user?joins=roleColletion:key:eq:admin

This will query all users with where roleColletion.key = admi n

Operators: Use this guide to check what you can put between field:{opera tor}:value

http://docs.doctrine-project.org/en/2.1/reference/query-build er.html#the-expr-class

You can use `eq` `like` `lt` `lte` `gt` `gte` `neq` and more methods based on key:value

Combined with Fields, limit, offset http://skel.dev/api/v1/user?fields=id,name&limit=10&offset=0

This set of parameters can be combined with both listed above (filters and joins)

Count http://skel.dev/api/v1/user?filter=name:like:%elton%&count=1

http://skel.dev/api/v1/user?count=1

Designed, built and made in Amsterdam with all the love by @bcambel (http://twitter.com/bahadircambel) www.oss.io running version @ (https://github.com/bcambel/oss.io/commit/) Code licensed under MIT (https://github.com/bcambel/oss.io/blob/development/LICENSE)

Tweet

Follow @pythonhackers

2,251 followers

Star

140

Star

228

Loading...

SOA

OpenSourceSoftware (http://www.oss.io) Users (/users?ref=top_menu_link) (Python) Top Projects (/open-source/?ref=top_menu_link) Languages About (/...

62KB Sizes 4 Downloads 13 Views

Recommend Documents

soa - phppackages.org
Silex Controller Provider to provide SOA access to Doctrine entities and services.

Oracle SOA blog: Soa 11g Human Task client Authentication
Feb 18, 2010 - IWorkflowContext iWorkflowC = itTask.authenticate(null, null, null); // Here not created the context IBPM

Zuul | SOA Essentials
Firstly let's see what is load balancing;. It's mainly distributing work of a computer to two or more similar computers.

Soa exam c manual
Marcelo rudders fetal scans unanimously planning? untenanted Ephraim mingles his Captivator apostatar rustily guillotine

National Football League - SOA
NFL players have been covered by this pension plan since 1962. The plan considers age 55 to ... 12,016. Average approxim

(SOA) Environments - Semantic Community
Research, Technology and Systems Solutions (RTSS) Program. System of Systems Practice (SoSP) Initiative .... the full sy

SOA and Microservices :: PHP Roundtable
Sep 1, 2015 - If you read the gang of four book (Design Patterns: Elements of Reusable Object-Oriented Software), everyt

Asset-Liability Integration: "Introduction" - SOA
Life Insurance. 12th ed. Upper Saddle River, NJ: Prentice Hall/Simon & ... and Corporate Policy (reprint of 1988 edition

Guide to SOA Written Exams
Appropriate Assessment Methods. When the SOA's examination system was re-designed during 2005-2007 a key change was that

Soa service oriented architecture ppt
Hakim coarse grain and expandable soal dan pembahasan persamaan garis lurus smk prigged categorize your necrotizing geta