Get an array of all defined properties

@return array
498585
public function toArray()
    {
        $result = [
            'browser'   => $this->browser->toArray(),
            'engine'    => $this->engine->toArray(),
            'os'        => $this->os->toArray(),
            'device'    => $this->device->toArray()
        ];

        if (empty($result['browser'])) {
            unset($result['browser']);
        }

        if (empty($result['engine'])) {
            unset($result['engine']);
        }

        if (empty($result['os'])) {
            unset($result['os']);
        }

        if (empty($result['device'])) {
            unset($result['device']);
        }

        if ($this->camouflage) {
            $result['camouflage'] = true;
        }

        return $result;
    }
827327
public function toArray()
    {
        $array = array();

        foreach($this->_data as $key=>$value)
            $array[$key] = ($value instanceof PropertyReference) ? $value->value() : $value;

        return $array;
    }
974799
public function getProperties()
    {
        $propertyList = (new PropertyListFactory())->create();
        foreach ($this->item->getProperties() as $propertyName => $propertyValues) {
            $propertyList[$propertyName] = array_map([$this, 'getPropertyValue'], $propertyValues);
        }

        return $propertyList;
    }
882551
protected static function define_properties() {
        return array(
            'userid' => array(
                'type' => PARAM_INT
            ),
            'name' => array(
                'type' => PARAM_TEXT
            ),
            'description' => array(
                'type' => PARAM_CLEANHTML,
                'default' => '',
            ),
            'descriptionformat' => array(
                'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
                'type' => PARAM_INT,
                'default' => FORMAT_HTML,
            ),
            'url' => array(
                'type' => PARAM_URL,
                'default' => '',
                'message' => new lang_string('invalidurl', 'core_competency')
            )
        );
    }
81244
public function buildProperties()
    {
        $methods            = get_class_methods($this);
        $properties         = get_object_vars($this);
        $filteredProperties = array();

        // only properties that have getters should be extracted
        foreach ($properties as $property => $value) {
            $getter = 'get' . $this->camelize($property, true);
            if (in_array($getter, $methods)) {
                $filteredProperties[$property] = $this->{$getter}();
            }
        }

        return $filteredProperties;
    }
602657
public function getModifiedProperties()
    {
        if ($this->read_only) {
            return array();
        }

        $modified_properties = array();
        foreach ($this->getProperties() as $name => $value) {
            $hashed_value = $this->getHashValue($value);
            if (
                array_key_exists($name, $this->property_hashes) &&
                $hashed_value !== $this->property_hashes[$name]
            ) {
                $modified_properties[$name] = $value;
            }
        }

        return $modified_properties;
    }
236565
protected static function define_properties() : array {
        return array(
                'name' => [
                        'type' => PARAM_TEXT,
                ],
                'shortname' => [
                        'type' => PARAM_TEXT,
                ],
                'type' => [
                        'type' => PARAM_PLUGIN,
                ],
                'description' => [
                        'type' => PARAM_RAW,
                        'optional' => true,
                        'default' => null,
                        'null' => NULL_ALLOWED
                ],
                'descriptionformat' => [
                        'type' => PARAM_INT,
                        'default' => FORMAT_MOODLE,
                        'optional' => true
                ],
                'sortorder' => [
                        'type' => PARAM_INT,
                        'optional' => true,
                        'default' => -1,
                ],
                'categoryid' => [
                        'type' => PARAM_INT
                ],
                'configdata' => [
                        'type' => PARAM_RAW,
                        'optional' => true,
                        'default' => null,
                        'null' => NULL_ALLOWED
                ],
        );
    }
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);
    }
854427
protected static function define_properties() {
        return [
            'id' => [
                'type' => PARAM_INT,
                'description' => 'Area id.',
            ],
            'component' => [
                'type' => PARAM_COMPONENT,
                'description' => 'Component the area is related to.',
            ],
            'itemtype' => [
                'type' => PARAM_ALPHANUMEXT,
                'description' => 'Type of item in the component.',
            ],
            'enabled' => [
                'type' => PARAM_BOOL,
                'description' => 'Whether this area is enabled.',
                'default' => true,
            ],
            'tagcollid' => [
                'type' => PARAM_INT,
                'description' => 'The tag collection this are belongs to.',
            ],
            'callback' => [
                'type' => PARAM_RAW,
                'description' => 'Component callback for processing tags.',
                'null' => NULL_ALLOWED,
            ],
            'callbackfile' => [
                'type' => PARAM_RAW,
                'description' => 'Component callback file.',
                'null' => NULL_ALLOWED,
            ],
            'showstandard' => [
                'type' => PARAM_INT,
                'description' => 'Return whether to display only standard, only non-standard or both tags.',
                'default' => 0,
            ],
            'multiplecontexts' => [
                'type' => PARAM_BOOL,
                'description' => 'Whether the tag area allows tag instances to be created in multiple contexts. ',
                'default' => false,
            ],
        ];
    }
614740
public function toArray()
	{
		$properties = parent::toArray();

		$properties[$this->_prefix . 'refid'] = $this->getRefId();
		$properties[$this->_prefix . 'position'] = $this->getPosition();

		return $properties;
	}
281560
public function toArray()
    {
        $data = [
            'name' => $this->name,
            'type' => $this->type,
            'description' => $this->description
        ];

        if (null !== $this->child) {
            $data['properties'] = [];

            foreach ($this->child as $child) {
                $data['properties'][$child->getName()] = $child->toArray();
            }
        }

        return $data;
    }
695040
protected function propertiesFromAttributes(): array
    {
        // Get all managed properties
        $propertyNames = $this->entityMap->getProperties();

        $propertyAttributes = array_only($this->attributes, $propertyNames);
        $attributesArray = array_except($this->attributes, $propertyNames);

        $attributesArrayName = $this->entityMap->getAttributesArrayName();

        if ($attributesArrayName) {
            $propertyAttributes[$attributesArrayName] = $attributesArray;
        }

        return $propertyAttributes;
    }
1299604
protected static function define_properties() {
        return array(
            'usercompetencyid' => array(
                'type' => PARAM_INT
            ),
            'contextid' => array(
                'type' => PARAM_INT
            ),
            'action' => array(
                'type' => PARAM_INT,
                'choices' => array(self::ACTION_LOG, self::ACTION_COMPLETE, self::ACTION_OVERRIDE)
            ),
            'actionuserid' => array(
                'type' => PARAM_INT,
                'default' => null,
                'null' => NULL_ALLOWED
            ),
            'descidentifier' => array(
                'type' => PARAM_STRINGID
            ),
            'desccomponent' => array(
                'type' => PARAM_COMPONENT
            ),
            'desca' => array(
                'type' => PARAM_RAW,
                'default' => null,
                'null' => NULL_ALLOWED
            ),
            'url' => array(
                'type' => PARAM_URL,
                'default' => null,
                'null' => NULL_ALLOWED
            ),
            'grade' => array(
                'type' => PARAM_INT,
                'default' => null,
                'null' => NULL_ALLOWED
            ),
            'note' => array(
                'type' => PARAM_NOTAGS,
                'default' => null,
                'null' => NULL_ALLOWED
            )
        );
    }
54014
protected static function define_properties() {
        return [
            'id' => [
                'type' => PARAM_INT,
                'description' => 'Collection id.',
            ],
            'name' => [
                'type' => PARAM_NOTAGS,
                'description' => 'Collection name.',
                'null' => NULL_ALLOWED,
            ],
            'isdefault' => [
                'type' => PARAM_BOOL,
                'description' => 'Whether is the default collection.',
                'default' => false,
            ],
            'component' => [
                'type' => PARAM_COMPONENT,
                'description' => 'Component the collection is related to.',
                'null' => NULL_ALLOWED,
            ],
            'sortorder' => [
                'type' => PARAM_INT,
                'description' => 'Collection ordering in the list.',
            ],
            'searchable' => [
                'type' => PARAM_BOOL,
                'description' => 'Whether the tag collection is searchable.',
                'default' => true,
            ],
            'customurl' => [
                'type' => PARAM_NOTAGS,
                'description' => 'Custom URL for the tag page instead of /tag/index.php.',
                'null' => NULL_ALLOWED,
            ],
        ];
    }
672667
public function properties() {
    $props = array();

    if ($this->itemScope()) {
      $toTraverse = array($this);

      foreach ($this->itemRef() as $itemref) {
        $children = $this->ownerDocument->xpath()->query('//*[@id="'.$itemref.'"]');
        foreach($children as $child) {
          $this->traverse($child, $toTraverse, $props, $this);
        }
      }
      while (count($toTraverse)) {
        $this->traverse($toTraverse[0], $toTraverse, $props, $this);
      }
    }

    return $props;
  }
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;
  }
390220
protected static function define_properties() {
        return array(
            'shortname' => array(
                'type' => PARAM_TEXT
            ),
            'idnumber' => array(
                'type' => PARAM_RAW
            ),
            'description' => array(
                'default' => '',
                'type' => PARAM_CLEANHTML
            ),
            'descriptionformat' => array(
                'choices' => array(FORMAT_HTML, FORMAT_MOODLE, FORMAT_PLAIN, FORMAT_MARKDOWN),
                'type' => PARAM_INT,
                'default' => FORMAT_HTML
            ),
            'sortorder' => array(
                'default' => 0,
                'type' => PARAM_INT
            ),
            'parentid' => array(
                'default' => 0,
                'type' => PARAM_INT
            ),
            'path' => array(
                'default' => '/0/',
                'type' => PARAM_RAW
            ),
            'ruleoutcome' => array(
                'choices' => array(self::OUTCOME_NONE, self::OUTCOME_EVIDENCE, self::OUTCOME_COMPLETE, self::OUTCOME_RECOMMEND),
                'default' => self::OUTCOME_NONE,
                'type' => PARAM_INT
            ),
            'ruletype' => array(
                'type' => PARAM_RAW,
                'default' => null,
                'null' => NULL_ALLOWED
            ),
            'ruleconfig' => array(
                'default' => null,
                'type' => PARAM_RAW,
                'null' => NULL_ALLOWED
            ),
            'scaleid' => array(
                'default' => null,
                'type' => PARAM_INT,
                'null' => NULL_ALLOWED
            ),
            'scaleconfiguration' => array(
                'default' => null,
                'type' => PARAM_RAW,
                'null' => NULL_ALLOWED
            ),
            'competencyframeworkid' => array(
                'default' => 0,
                'type' => PARAM_INT
            ),
        );
    }