Get Document's properties.

@return array|boolean
@throws Exception
192255
public function getProperties()
    {
        //build URI to merge Docs
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/documentProperties';
        //sign URI
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');
        $json = json_decode($responseStream);
        if ($json->Code == 200)
            return $json->DocumentProperties->DocumentPropertyList;
        else
            return false;
    }
618581
final public static function get_formatted_properties() {
        $properties = static::properties_definition();

        $formatted = array();
        foreach ($properties as $property => $definition) {
            $propertyformat = $property . 'format';
            if (($definition['type'] == PARAM_RAW || $definition['type'] == PARAM_CLEANHTML)
                    && array_key_exists($propertyformat, $properties)
                    && $properties[$propertyformat]['type'] == PARAM_INT) {
                $formatted[$property] = $propertyformat;
            }
        }

        return $formatted;
    }
303266
public function getDocument()
    {
        if (!$this->valid) {
            return false;
        } elseif ($this->document) {
            return $this->document;
        } else {
            $this->document = new DOMDocument('1.0', 'UTF-8');
            $this->document->strictErrorChecking = false;
            $this->document->formatOutput = false;

            return $this->document;
        }
    }
939253
public function getPropertiesData()
    {
        $data = $this->properties->getData();

        $class = $this->modx->loadClass($this->blendable_xpdo_simple_object_data['class_key']);
        $mediaObject = new $class($this->modx);

        if (is_object($mediaObject) && method_exists($mediaObject, 'getDefaultProperties')) {
            $default_props = $mediaObject->getDefaultProperties();

            foreach ($default_props as $key => $value) {
                $set_value = $value;
                if (isset($data[$key])) {
                    $set_value = $data[$key];
                }
                $data[$key] = $set_value;

                if (isset($data[$key]) && is_array($value) && is_string($set_value)) {
                    $data[$key] = $value;
                    $data[$key]['value'] = $set_value;
                }
            }
        }

        return $data;
    }
1124355
private function propertiesToXml() {
        $properties = array();

        foreach (self::$properties[get_class($this)] as $name => $info) {
            if($info['attribute']) {
                continue;
            }

            if (!array_key_exists($name, $this->values)) {
                continue;
            }

            $value = $this->values[$name];

            if(!array_key_exists('elementName', $info) && !array_key_exists('attributeName', $info)) {
                $properties[] = self::encodeValueXml($value);
            }
            else {
                if ($info['unbound']) {
                    foreach($value as $property) {
                        $properties[] = self::propertyToXml($info['elementName'], $property);
                    }
                } else {
                    $properties[] = self::propertyToXml($info['elementName'], $value);
                }
            }
        }

        return join('', $properties);
    }
1290536
public function getProperties()
    {
        if ($this->properties === null) {
            // lazy load class properties list
            $this->properties = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\Property) {
                    $this->properties[] = new PropertyModel($this, $stmt);
                }
            }
        }
        return array_values($this->properties);
    }
954395
public function getProperties()
    {
        $url      = UrlHelper::buildUrl(Urls::URL_QUERY_CACHE);
        $response = $this->getConnection()->get($url);

        return $response->getJson();
    }
899671
public function enaDocumentFiles()
    {
        $properties = $this->getProperties();
        $extString  = (!empty($properties['acceptedFiles'])) ? $properties['acceptedFiles'] : '';
        $docsExts   = $this->getDocumentExtensionConstant();
        foreach ($docsExts as $docsExt) {
            if (strpos($extString, $docsExt) === false) {
                $extString .= ','.$docsExt;
            }
        }
        $extString                      = substr($extString, 1);
        $properties                     = $this->getProperties();
        $properties['acceptedFiles']    = $extString;
        $this->setProperties($properties);
        return $this;
    }
760458
public function getDocumentActualData($document)
    {
        $class      = $this->dm->getClassMetadata(get_class($document));
        $actualData = [];

        foreach ($class->propertyMetadata as $name => $mapping) {
            // skip not saved attributes
            if ($mapping->notSaved) {
                continue;
            }

            $value = $mapping->getValue($document);

            if ($mapping->isMany() && $value !== null && !($value instanceof PersistentCollectionInterface)) {
                // If $actualData[$name] is not a Collection then use an ArrayCollection.
                if (!$value instanceof Collection) {
                    $value = new ArrayCollection($value);
                }

                // Inject PersistentCollection
                $coll = $this->dm->getConfiguration()->getPersistentCollectionFactory()->create($this->dm, $mapping, $value);
                $coll->setOwner($document, $mapping);
                $coll->setDirty(!$value->isEmpty());
                $mapping->setValue($document, $coll);
                $actualData[$name] = $coll;
            } else {
                $actualData[$name] = $value;
            }
        }

        return $actualData;
    }
508026
protected function getLabelsFromProperties(array $properties)
    {
        if (!Helpers::isKeyExists($properties, 'labels')) {
            throw new Exception('The resource-file is missing the labels entry for the ' . $this->name . ' field.');
        }

        if (is_array($properties['labels'])) {
            //At this point we know this the label
            return $this->getLabelsFromArray($properties['labels']);
        }

        return [
            new Label($properties['labels'], $this->localeGroup, true, $this->defaultLang),
        ];
    }
776644
public function getPropertyAnnotations($property)
    {
        if (!$this->hasProperty($property)) {
            $name = $this->_getReflection()->getName();
            throw new Exception\InvalidArgumentException(
                "The class {$name} doesn't have a property called {$property}"
            );
        }

        if (empty($this->_annotations['properties'][$property])) {
            $comment = $this->_getReflection()
                ->getProperty($property)
                ->getDocComment();
            $data = AnnotationParser::getAnnotations($comment);
            $propertyAnnotations = new AnnotationsList();
            foreach ($data as $property => $parsedData) {
                $propertyAnnotations->append(
                    $this->_createAnnotation($property, $parsedData)
                );
            }
            $this->_annotations['properties'][$property] = $propertyAnnotations;
        }
        return $this->_annotations['properties'][$property];
    }
1068546
public function getDocument()
    {
        if (null === $this->document) {
            $parent = $this->parent;
            while (true) {
                if (!$parent) {
                    break;
                }
                if ($parent->parent) {
                    $parent = $parent->parent;
                } else {
                    break;
                }
            }
            $this->document = $parent;
        }

        return $this->document;
    }
1301269
public function getProperties()
    {
        $properties = [];

        foreach ($this->audios as $audio) {
            $properties = array_merge($properties, $audio->getProperties());
        }
        
        if ($this->title !== null) {
            $properties[] = new Property(Property::TITLE, $this->title);
        }

        if ($this->description !== null) {
            $properties[] = new Property(Property::DESCRIPTION, $this->description);
        }

        if ($this->determiner !== null) {
            $properties[] = new Property(Property::DETERMINER, $this->determiner);
        }

        foreach ($this->images as $image) {
            $properties = array_merge($properties, $image->getProperties());
        }

        if ($this->locale !== null) {
            $properties[] = new Property(Property::LOCALE, $this->locale);
        }

        foreach ($this->localeAlternate as $locale) {
            $properties[] = new Property(Property::LOCALE_ALTERNATE, $locale);
        }

        if ($this->richAttachment !== null) {
            $properties[] = new Property(Property::RICH_ATTACHMENT, (int)$this->richAttachment);
        }

        foreach ($this->seeAlso as $seeAlso) {
            $properties[] = new Property(Property::SEE_ALSO, $seeAlso);
        }

        if ($this->siteName !== null) {
            $properties[] = new Property(Property::SITE_NAME, $this->siteName);
        }

        if ($this->type !== null) {
            $properties[] = new Property(Property::TYPE, $this->type);
        }

        if ($this->updatedTime !== null) {
            $properties[] = new Property(Property::UPDATED_TIME, $this->updatedTime->format("c"));
        }

        if ($this->url !== null) {
            $properties[] = new Property(Property::URL, $this->url);
        }

        foreach ($this->videos as $video) {
            $properties = array_merge($properties, $video->getProperties());
        }

        return $properties;
    }
823694
public function getSchema()
    {
        $schemaLocation = $this->documentElement->getAttribute('xsi:schemaLocation');
        if (!$schemaLocation or strpos($schemaLocation, ' ')===false)
            return false;
        list($uri, $xsd) = explode(' ', $schemaLocation);
        return $xsd;
    }
1224432
public function updateProperties($properties = array())
    {
        //check whether worksheet name is set or not
        if ($this->worksheetName == '')
            throw new Exception('Worksheet name not specified');

        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() .
            '/workbook/worksheets/' . $this->worksheetName;

        $signedURI = Utils::sign($strURI);

        $json_data = json_encode($properties);

        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $json_data);
        $json = json_decode($responseStream);
        if ($json->Code == 200)
            return $json->Worksheet;
        else
            return false;

    }
608880
private function getAllProperties()
    {
        $allProperties = get_object_vars($this);
        $properties = array();
        foreach ($allProperties as $fullName => $value) {
            $fullNameComponents = explode("\0", $fullName);
            $propertyName = array_pop($fullNameComponents);
            if ($propertyName && isset($value)) {
                $properties[ $propertyName ] = $value;
            }
        }
        
        return $properties;
    }
1235577
public function getProperties() {
    $properties = array();
    foreach ($this->properties as $property) {
      if ($property->getDeclaringClass() instanceof GClass && 
          $property->getDeclaringClass()->equals($this)) {
        $properties[$property->getName()] = $property;
      }
    }
    return $properties;
  }