public getOperations ( boolean $includingChildren = false ) | ||
$includingChildren | boolean | Get operations from children as well |
public function getOperations($includingChildren = false)
{
$operations = $this->_operations;
if ($includingChildren) {
foreach ($this->_data as $property => $document) {
if (!$document instanceof Shanty_Mongo_Document) {
continue;
}
if (!$this->isReference($document) && !$this->hasRequirement($property, 'AsReference')) {
$operations = array_merge_recursive($operations, $document->getOperations(true));
}
}
}
return $operations;
}
/** * Get all operations * * @param Boolean $includingChildren Get operations from children as well */ public function getOperations($includingChildren = false) { if ($this->hasRequirement(self::DYNAMIC_INDEX, 'AsReference')) { $includingChildren = false; } return parent::getOperations($includingChildren); }