Exemple #1
0
$options6 = new MLPHP\Options($client);
// Create an Options object (passing the REST client object)
$eq = new MLPHP\ElementQueryConstraint('title', 'title', 'http://my/namespace');
// Set element namespace
$options6->addConstraint($eq);
// Add the constraint to the Options object
$options6->write('options6');
// Write the search options to the database
// Read the options from the database and display
echo "Element-query constraint:\n\n";
echo htmlspecialchars($options6->read('options6'));
echo "\n\n";
// Various options
$options7 = new MLPHP\Options($client);
// Create an Options object (passing the REST client object)
$options7->setConcurrencyLevel(16);
// Set concurrency level
$options7->setPageLength(20);
// Set page length
$options7->setQualityWeight(0.5);
// Set quality weight
$options7->write('options7');
// Write the search options to the database
// Read the options from the database and display
echo "Various options:\n\n";
echo htmlspecialchars($options7->read('options7'));
echo "\n\n";
// More options
$options8 = new MLPHP\Options($client);
// Create an Options object (passing the REST client object)
$options8->setReturnConstraints('true');