<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
craftyshadow / propel-equalnest-behavior example snippets
$john = new Person();
$peter = new Person();
$marry = new Person();
$john->addFriend($peter);
$john->addFriend($marry);
$john->addFriends(array($peter, $marry)); // same as the above
$john->getFriends(); // returns a PropelObjectCollection ($peter, $marry)
$john->hasFriend($peter); // true
$peter->hasFriend($john); // true
$john->removeFriends();
$john->getFriends(); // empty array
$john->save(); // commit to the DB
$person->addFriend($friend);
$person->hasFriend($friend);
// get all friends, will be cached if no citeria specified. Filtered by the criteria otherwize
$person->getFriends($criteria = null, $con = null);
// replace the current collection of friends
$person->setFriends($friends_array);
// append to the current collection of friends
$person->addFriends($friends_array);
// remove a specfic friend
$person->removeFriend($friend)
// remove all friends
$person->removeFriends();
$person->countFriends($criteria = null, $distinct = false, $con = null);
ini
; check that you have behaviors enabled
propel.builder.addBehaviors = true
; and add the custom behavior
propel.behavior.equal_nest.class = lib.vendor.equal_nest_behavior.EqualNestBehavior
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.