Get support for vincentchalamon/nav-bundle
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
vincentchalamon/nav-bundle
NavBundle
This bundle is not supported anymore!
This Symfony Bundle is used to map objects with a Microsoft Dynamics NAV service.
Requirements
- PHP ^7.3
- PHP extensions: curl, dom, soap
Installation
composer req vincentchalamon/nav-bundle
Configuration
nav:
url: '%env(NAV_URL)%' # i.e.: https://user:pass@www.example.com/NAV_WS/
paths:
App:
path: '%kernel.project_dir%/src/Entity'
namespace: 'App/Entity'
Advanced configuration
nav:
enable_profiler: '%kernel.debug%'
foo:
wsdl: '%env(NAV_WSDL)%'
connection:
class: App\Connection\CustomConnectionClass
username: '%env(NAV_USERNAME)%'
password: '%env(NAV_PASSWORD)%'
paths:
Foo:
path: '%kernel.project_dir%/src/Entity/Foo'
namespace: 'App/Entity/Foo'
entity_manager_class: App\EntityManager\CustomEntityManager
driver: nav.class_metadata.driver.annotation
name_converter: nav.serializer.name_converter.camel_case_to_nav
soap_options:
soap_version: 1
connection_timeout: 120
exception: '%kernel.debug%'
trace: '%kernel.debug%'
bar:
wsdl: '%env(ANOTHER_WSDL)%'
connection:
class: App\Connection\CustomConnectionClass
username: '%env(ANOTHER_USERNAME)%'
password: '%env(ANOTHER_PASSWORD)%'
paths:
Bar:
path: '%kernel.project_dir%/src/Entity/Bar'
namespace: 'App/Entity/Bar'
entity_manager_class: App\EntityManager\CustomEntityManager
driver: app.class_metadata.custom
name_converter: nav.serializer.name_converter.camel_case_to_nav
soap_options:
soap_version: 1
connection_timeout: 120
exception: '%kernel.debug%'
trace: '%kernel.debug%'
Usage
namespace App\Entity;
use NavBundle\Annotation as Nav;
/**
* @Nav\Entity(namespace="Contact")
*/
final class Contact
{
/**
* @Nav\Column
* @Nav\Key
*/
public $key;
/**
* @Nav\Column
* @Nav\No
*/
public $no;
/**
* @Nav\Column(name="Custom_Email", nullable=true)
*/
public $email;
/**
* @Nav\Column(type="date", nullable=true)
*/
public $date;
/**
* @Nav\ManyToOne(targetClass=Foo::class)
*/
public $foo;
}
Read
/** @var \NavBundle\RegistryInterface $registry */
$registry = $container->get('nav.registry');
$manager = $registry->getManagerForClass(Contact::class);
$repository = $manager->getRepository(Contact::class);
// Find entity by primary key
$repository->find($no);
// Find collection by a set of criteria
$repository->findBy(['foo' => 'bar']);
// Find entity by a set of criteria
$repository->findOneBy(['foo' => 'bar']);
// Find all
$repository->findAll();
Write/delete
/** @var \NavBundle\RegistryInterface $registry */
$registry = $container->get('nav.registry');
$manager = $registry->getManagerForClass(Contact::class);
// Create/Update
$manager->persist($object);
// Delete
$manager->remove($object);
// Flush
$manager->flush();
// It's also possible to flush an object or an array of objects
$manager->flush($object);
Profiler
Code of conduct
This bundle is ruled by a code a conduct.
Contributing
Please have a look to the contributing guide.
Backward Compatibility promise
This bundle follows the same Backward Compatibility promise as the Symfony framework: https://symfony.com/doc/current/contributing/code/bc.html
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2