@param object $object
@param bool $deep

@return string
512706
public function toXmlString($object, $deep = self::SHALLOW)
    {
        return $this->arrayUtils->toXmlString($this->toArray($object, $deep));
    }
129318
public static function hash($object, $algoOrCtx = 'md5', $raw = FALSE)
	{
		if (is_string($algoOrCtx)) {
			$ctx = hash_init($algoOrCtx);
		} else {
			$ctx = $algoOrCtx;
		}

		if (isset($object->name)) {
			hash_update($ctx, 'name');
			hash_update($ctx, (string)$object->name);
		}

		if (isset($object->inputType)) {
			hash_update($ctx, 'inputType');
			hash_update($ctx, (string)$object->inputType);
		}

		if (isset($object->outputType)) {
			hash_update($ctx, 'outputType');
			hash_update($ctx, (string)$object->outputType);
		}

		if (isset($object->options)) {
			hash_update($ctx, 'options');
			MethodOptionsMeta::hash($object->options, $ctx);
		}

		if (isset($object->clientStreaming)) {
			hash_update($ctx, 'clientStreaming');
			hash_update($ctx, (string)$object->clientStreaming);
		}

		if (isset($object->serverStreaming)) {
			hash_update($ctx, 'serverStreaming');
			hash_update($ctx, (string)$object->serverStreaming);
		}

		if (is_string($algoOrCtx)) {
			return hash_final($ctx, $raw);
		} else {
			return null;
		}
	}
417058
protected function getObjectString($object)/*# : string */
    {
        // exception found
        if ($object instanceof \Exception) {
            return 'EXCEPTION: ' . $object->getMessage();

        // toString() found
        } elseif (method_exists($object, '__toString')) {
            return (string) $object;

        // other type object
        } else {
            return 'OBJECT: ' . get_class($object);
        }
    }
1116497
protected function write($object, $level)
    {
        if ($this->enabled && $this->writer && $level <= $this->level) {
            return $this->writer->write($object, $level);
        } else {
            return false;
        }
    }
109253
protected function quoteObject($object, $settings)/*# : string */
    {
        if ($object instanceof StatementInterface) {
            $settings = $this->flatSettings($settings);
            return '(' . ltrim($object->getStatement($settings)) . ')';
        } elseif ($object instanceof OutputInterface) {
            return $object->getStatement($settings);
        }
        return (string) $object;
    }
60987
public static function fd($object, $type = 'log')
    {
        $types = array('log', 'debug', 'info', 'warn', 'error', 'assert');

        if (!\in_array($type, $types, true)) {
            $type = 'log';
        }

        $data = json_encode($object);

        echo '<script type="text/javascript">console.' . $type . '(' . $data . ');</script>';
    }
516975
public static function getRealClass($object)
    {
        $class = is_object($object) ? get_class($object) : $object;

        if (class_exists('Doctrine\Common\Util\ClassUtils')) {
            return DoctrineClassUtils::getRealClass($class);
        }

        // fallback in case doctrine common  is not installed
        if (false === $pos = strrpos($class, '\\'.self::MARKER.'\\')) {
            return $class;
        }

        return substr($class, $pos + self::MARKER_LENGTH + 2);
    }
699491
public function getDataForRow($key, $object)
    {
        $translationManager = $this->framework->getInstance('\\Zepi\\Core\\Language\\Manager\\TranslationManager');
        
        switch ($key) {
            case 'name':
                return '<span class="mdi mdi-group"></span>' . $object->getName();
            break;
            
            case 'uuid':
                return $object->getUuid();
            break;
            
            case 'actions':
                $request = $this->framework->getRequest();
                return '<a href="' . $request->getFullRoute('administration/groups/modify/' . $object->getUuid()) . '" class="btn btn-primary"><span class="glyphicon glyphicon-pencil"></span>'
                     .     $translationManager->translate('Modify', '\\Zepi\\Web\\AccessControl')
                     . '</a>'
                     . '<a href="' . $request->getFullRoute('administration/groups/delete/' . $object->getUuid()) . '" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span>'
                     .     $translationManager->translate('Delete', '\\Zepi\\Web\\AccessControl')
                     . '</a>';
            break;
                
            default:
                return '-';
            break;
        }
    }
1073648
public function strip_empty_keys($object){

		$json = json_encode($object);
		$json = preg_replace('/,\s*"[^"]+":null|"[^"]+":null,?/', '', $json);
		$object = json_decode($json);

		return $object;
    }
1112691
public function get($key, $default = null, $deep = false)
    {
        if (is_array($key)) {
            $request = [];
            foreach ($key as $k) {
                $_default = is_array($default) && isset($default[$k]) ? $default[$k] : null;
                $request[$k] = parent::get($k, $_default);
            }
        }
        else {
            $request = parent::get($key, $default);
        }

        return $request;
    }
939328
public static function hash($object, $algoOrCtx = 'md5', $raw = FALSE)
	{
		if (is_string($algoOrCtx)) {
			$ctx = hash_init($algoOrCtx);
		} else {
			$ctx = $algoOrCtx;
		}

		if (isset($object->deprecated)) {
			hash_update($ctx, 'deprecated');
			hash_update($ctx, (string)$object->deprecated);
		}

		if (isset($object->uninterpretedOption)) {
			hash_update($ctx, 'uninterpretedOption');
			foreach ($object->uninterpretedOption instanceof \Traversable ? $object->uninterpretedOption : (array)$object->uninterpretedOption as $v0) {
				UninterpretedOptionMeta::hash($v0, $ctx);
			}
		}

		if (is_string($algoOrCtx)) {
			return hash_final($ctx, $raw);
		} else {
			return null;
		}
	}
996005
private function convertExpandKeysInObjects($expandKeys, $object)
	{
		// only hanlde objects
		if (!is_object($object))
		{
			return $object;
		}

		// spin over each key replacing the date with new format
		foreach (array_keys(get_object_vars($object)) as $key)
		{
			if (array_key_exists($key, $expandKeys))
			{
				$func = $expandKeys[$key] . 'Expander';
				if (method_exists($this, $func))
				{
					$object->$key = $this->$func($object->$key);
				}
			}
		}

		// return object
		return $object;
	}
1189264
private function getState($object)
    {
        if (!$this->entityStates->contains($object)) {
            $this->createState($object, false);
        }

        return $this->entityStates[ $object ];
    }
1142315
public static function objectToID($object)
    {
        $resultID = null;
        if (is_object($object) && method_exists($object, '__toString')
        ) {
            $resultID = $object->__toString();
        } else {
            if (is_array($object)) {
                foreach ($object as $item => $value) {
                    $resultID[$item] = self::objectToID($value);
                }
            } else { //String
                $resultID = $object;
            }
        }

        return $resultID;
    }
1022166
public function transform($object)
    {
        if (null === $object) {
            return '';
        }

        return current(array_values($this->om->getClassMetadata($this->entityName)->getIdentifierValues($object)));
    }
1220251
protected function getId(&$object)
    {
        if (is_array($object)) {
            if (isset($object['_id']) && $object['_id']) {
                return $object['_id'];
            }

            return $object['_id'] = new ObjectId();
        }

        if (is_object($object) && !$object instanceof ObjectId) {
            if (isset($object->_id) && $object->_id) {
                return $object->_id;
            }

            return $object->_id = new ObjectId();
        }

        return $object;
    }
302528
public static function hash($object, $algoOrCtx = 'md5', $raw = FALSE)
	{
		if (is_string($algoOrCtx)) {
			$ctx = hash_init($algoOrCtx);
		} else {
			$ctx = $algoOrCtx;
		}

		if (isset($object->namePart)) {
			hash_update($ctx, 'namePart');
			hash_update($ctx, (string)$object->namePart);
		}

		if (isset($object->isExtension)) {
			hash_update($ctx, 'isExtension');
			hash_update($ctx, (string)$object->isExtension);
		}

		if (is_string($algoOrCtx)) {
			return hash_final($ctx, $raw);
		} else {
			return null;
		}
	}