PHP code example of xdimedrolx / rulerz-bundle
1. Go to this page and download the library: Download xdimedrolx/rulerz-bundle 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/ */
xdimedrolx / rulerz-bundle example snippets
public function registerBundles()
{
return array(
// ...
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
);
}
$rulerz = $this->container->get('rulerz');
$rulerz->filter(/* ... */);
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\RulerZ\Validator\Constraints as RulerZAssert;
class TaggingRule
{
/**
* @var string
*
* @Assert\NotBlank()
* @RulerZAssert\ValidRule(
* allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"},
* allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or"}
* )
*/
private $rule;
}