Download the PHP package bleicker/nodes without Composer
On this page you can find all versions of the php package bleicker/nodes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package nodes
Usage
Introduce your Node implementation
MyNode.yml:
MyNode:
type: entity
MyNode.php:
class myNode extends AbstractContentNode {
}
Bootstap an usage of Service
ExampleApp.php
use Bleicker\ObjectManager\ObjectManager;
use Bleicker\Persistence\EntityManager;
use Bleicker\Persistence\EntityManagerInterface;
use Bleicker\Registry\Registry;
use Doctrine\ORM\Tools\Setup;
// Register schemas of this node package
Registry::set('doctrine.schema.paths.nodes', __DIR__ . "/vendor/bleicker/nodes/src/Schema/Persistence");
// Register schemas of you app
Registry::set('doctrine.schema.paths.nodes-functional', __DIR__ . "/Schema/Persistence");
// Register DB Connection
Registry::set('DbConnection', ['url' => 'mysql://john:doe@localhost/yourdb']);
// Register the PersistenceManagerInterface
ObjectManager::register(EntityManagerInterface::class, function () {
return EntityManager::create(
Registry::get('DbConnection'),
Setup::createYAMLMetadataConfiguration(Registry::get('doctrine.schema.paths'))
);
});
/** @var EntityManagerInterface $entityManager */
$entityManager = ObjectManager::get(EntityManagerInterface::class);
$node = new Page();
$node1 = new Content();
$node2 = new Content();
$node3 = new Content();
$node->addChild($node1)->addChild($node2)->addChildAfter($node3, $node1);
$entityManager->persist($node);
$entityManager->flush();
All versions of nodes with dependencies
PHP Build Version
Package Version
Requires
bleicker/objectmanager Version
1.1.*
bleicker/persistence Version 1.1.*
bleicker/registry Version 1.2.*
bleicker/translation Version 0.2.*
bleicker/exception Version 1.0.*
bleicker/context Version 0.0.*
bleicker/persistence Version 1.1.*
bleicker/registry Version 1.2.*
bleicker/translation Version 0.2.*
bleicker/exception Version 1.0.*
bleicker/context Version 0.0.*
The package bleicker/nodes contains the following files
Loading the files please wait ....