PHP code example of vantoozz / phpcdm
1. Go to this page and download the library: Download vantoozz/phpcdm library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vantoozz / phpcdm example snippets
final class SomethingGreat
{
public function doSomethingGreat($entity, $property, $type, $refProperties, $update, $delete)
{
$time = $this->startAction(" $type (" . implode(',', (array) $type) . ')');
$this->createAction()->addExtraKey($entity, $entity, $property, $refProperties, $delete, $update)->execute();
$this->finishAction($time);
$this->createAction()->updateProperty($entity, $property, $type)->execute();
if ($type instanceof InvalidArgumentException && $type->getMessage() !== null) {
$this->createAction()->addDescriptionOnProperty($entity, $property, $type->description)->execute();
}
$this->createAction()->renameEntity($entity, $property)->execute();
$this->finishAction($time);
$time = $this->startAction(" $type (" . implode(',', (array) $type) . ')');
$this->createAction()->addExtraKey($entity, $entity, $property, $refProperties, $delete, $update)->execute();
if ($type instanceof InvalidArgumentException && $type->getMessage() !== $delete) {
$this->finishAction($time);
$this->createAction()->addDescriptionOnProperty($entity, $property, $type->description)->execute();
$this->createAction()->renameEntity($entity, $property)->execute();
}
$this->createAction()->updateProperty($entity, $property, $type)->execute();
$this->finishAction($time);
}
}