Builds accessible properties

@return string
168691
protected function buildAccessibleProperties()
    {
        $body = '';

        foreach ($this->accessibleProperties as $accessibleProperty) {
            $propertyName = $accessibleProperty->getName();
            $exportedPropertyName = var_export($propertyName, true);

            if (empty($this->propertyWriters) || ! $accessibleProperty->isProtected()) {
                $body .= $this->buildExtractProperty('%s => $object->%s,', [$exportedPropertyName, $propertyName]);
            } else {
                $body .= $this->buildExtractProperty('%s => $data["\\0*\\0%s"],', [$exportedPropertyName, $propertyName]);
            }
        }

        return $body;
    }
994550
protected static function define_properties() {
        return array(
            'name' => array(
                'type' => PARAM_TEXT
            ),
            'image' => array(
                'type' => PARAM_URL,
                'null' => NULL_ALLOWED,
                'default' => null
            ),
            'clientid' => array(
                'type' => PARAM_RAW_TRIMMED,
                'default' => ''
            ),
            'clientsecret' => array(
                'type' => PARAM_RAW_TRIMMED,
                'default' => ''
            ),
            'baseurl' => array(
                'type' => PARAM_URL,
                'default' => ''
            ),
            'enabled' => array(
                'type' => PARAM_BOOL,
                'default' => true
            ),
            'showonloginpage' => array(
                'type' => PARAM_BOOL,
                'default' => false
            ),
            'basicauth' => array(
                'type' => PARAM_BOOL,
                'default' => false
            ),
            'scopessupported' => array(
                'type' => PARAM_RAW,
                'null' => NULL_ALLOWED,
                'default' => null
            ),
            'loginscopes' => array(
                'type' => PARAM_RAW,
                'default' => 'openid profile email'
            ),
            'loginscopesoffline' => array(
                'type' => PARAM_RAW,
                'default' => 'openid profile email'
            ),
            'loginparams' => array(
                'type' => PARAM_RAW,
                'default' => ''
            ),
            'loginparamsoffline' => array(
                'type' => PARAM_RAW,
                'default' => ''
            ),
            'alloweddomains' => array(
                'type' => PARAM_RAW,
                'default' => ''
            ),
            'sortorder' => array(
                'type' => PARAM_INT,
                'default' => 0,
            ),
            'requireconfirmation' => array(
                'type' => PARAM_BOOL,
                'default' => true
            )
        );
    }
767280
private function getPropertiesInfo()
    {
        if (!$this->_automatedBehaviorInitialized) {
            $classInfo = Reader::getClassInformation($this);

            $this->_accessProperties = $classInfo['accessProperties'];
            $this->_collectionsItemNames = $classInfo['collectionsItemNames'];
            $this->_associationsList = $classInfo['associationsList'];
            $this->_initialPropertiesValues = $classInfo['initialPropertiesValues'];
            $this->_initializationNeededArguments = $classInfo['initializationNeededArguments'];

            if ($this->_constraintsValidationEnabled === null) {
                $this->_constraintsValidationEnabled = $classInfo['constraintsValidationEnabled'];
            }

            $this->_automatedBehaviorInitialized = true;
        }
    }
78812
public function visibleProperties()
    {
        $properties = array_keys($this->_properties);
        $properties = array_merge($properties, $this->_virtual);

        return array_diff($properties, $this->_hidden);
    }
954395
public function getProperties()
    {
        $url      = UrlHelper::buildUrl(Urls::URL_QUERY_CACHE);
        $response = $this->getConnection()->get($url);

        return $response->getJson();
    }
1134863
protected function buildPropertyMap()
    {
        $map = [];
        $properties = (new ReflectionObject($this))->getProperties(ReflectionProperty::IS_PUBLIC);

        foreach ($properties as $property) {
            $map[$property->getName()] = $property;
        }

        return $map;
    }
42864
private function buildGetSource() {
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('This returns the table name');
        $method->setName('getSource');
        $method->setReturnType('string');
        $method->setContent('return \'' . $this->getTableName() . '\';');
        $this->getAbstractClass()->addMethod($method);
    }
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;
    }
789457
public function properties()
    {
        if ($this->properties === null) {
            $model = $this->proto();
            $props = $model->metadata()->properties();

            $collectionIdent = $this->collectionIdent();
            if ($collectionIdent) {
                $metadata      = $model->metadata();
                $adminMetadata = isset($metadata['admin']) ? $metadata['admin'] : null;

                if (isset($adminMetadata['lists'][$collectionIdent]['properties'])) {
                    // Flipping to have property ident as key
                    $listProperties = array_flip($adminMetadata['lists'][$collectionIdent]['properties']);
                    // Replacing values of listProperties from index to actual property values
                    $props = array_replace($listProperties, $props);
                    // Get only the keys that are in listProperties from props
                    $props = array_intersect_key($props, $listProperties);
                }
            }

            $this->properties = $props;
        }

        return $this->properties;
    }
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;
    }
101089
protected function buildAttributes()
    {
        $attrs = array();

        $class = '';

        if(count($this->classes) > 0)
            $class = 'class="'.implode(' ', $this->classes).'" ';

        if(count($this->attributeString) > 0)
            $attrs = $this->attributeString;

        foreach($this->attributes as $key => $value)
            $attrs[] = $key.'="'.$value.'"';

        return $class.implode(' ', $attrs);
    }
821225
protected function buildForm()
    {
        if ($this->form) {
            return;
        }

        // append parent object if any
        // todo : clean the way the Admin class can retrieve set the object
        if ($this->isChild() && $this->getParentAssociationMapping()) {
            $parent = $this->getParent()->getObject($this->request->get($this->getParent()->getIdParameter()));

            $propertyAccessor = $this->getConfigurationPool()->getPropertyAccessor();
            $propertyPath = new PropertyPath($this->getParentAssociationMapping());

            $object = $this->getSubject();

            $value = $propertyAccessor->getValue($object, $propertyPath);

            if (\is_array($value) || ($value instanceof \Traversable && $value instanceof \ArrayAccess)) {
                $value[] = $parent;
                $propertyAccessor->setValue($object, $propertyPath, $value);
            } else {
                $propertyAccessor->setValue($object, $propertyPath, $parent);
            }
        }

        $formBuilder = $this->getFormBuilder();
        $formBuilder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
            $this->preValidate($event->getData());
        }, 100);

        $this->form = $formBuilder->getForm();
    }
953763
public function build()
    {
        $params = [
            'alert' => $this->alert,
            'title' => $this->title,
            'message_variation_id' => $this->messageVariationId,
            'priority' => $this->priority,
            'collapse_key' => $this->collapseKey,
            'sound' => $this->sound,
            'custom_uri' => $this->uri,
            'summary_text' => $this->summaryText,
            'time_to_live' => $this->timeToLive,
            'notification_id' => $this->notificationId,
            'push_icon_image_url' => $this->pushIconImageUrl,
            'accent_color' => $this->accentColour,
        ];

        if (!empty($this->extra)) {
            $params['extra'] = $this->extra;
        }

        return array_filter($params, function ($param) {
            return $param !== null;
        });
    }
1203125
protected function _buildApp()
    {
        $namespaces = '';
        foreach ($this->_namespaces as $namespace => $d) {
            $namespaces .= "\nuse $namespace;";
        }

        $namespaces .= "\n";

        return $this->getContainer()->get('templating')->render('CmsBaseBundle::app.html.twig', array(
        'namespaces' => $namespaces,
        'conststants' => $this->_constans,
        'properties' => $this->_properties,
        'methods' => $this->_methods,
      ));
    }
1049564
public function build() {
    $options_data = $this->buildOptionsData();

    $out_text = 
      $this->buildUsageLine($this->arguments_spec->getUsage(), $options_data);

    $options_text = '';
    if ($options_data['lines']) {
      foreach($options_data['lines'] as $option_line_data) {
        $options_text .= $this->buildOptionLine($option_line_data, $options_data)."\n";
      }

      $out_text .= 
        "\n".
        ConsoleFormat::applyformatToText('bold','cyan','Options:')."\n".
        $options_text;
    }

    return $out_text;
  }
480809
protected function buildOptions()
    {
        $created = '';

        foreach($this->getOptions() as $key => $value){

            if ($key === 'class') {
                $value = $this->buildClassString($value);
            }

            $created .= "$key='$value' ";
        }

        return rtrim($created, ' ');
    }