Shanty_Mongo_Document::getOperations PHP Method

getOperations() public method

Get all operations
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;
    }

Usage Example

Esempio n. 1
0
 /**
  * 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);
 }