Adds the privates property definition.

@return string
545082
private function addPrivateServices()
    {
        $code = '';

        $aliases = $this->container->getAliases();
        ksort($aliases);
        foreach ($aliases as $id => $alias) {
            if ($alias->isPrivate()) {
                $code .= '            '.$this->doExport($id)." => true,\n";
            }
        }

        $definitions = $this->container->getDefinitions();
        ksort($definitions);
        foreach ($definitions as $id => $definition) {
            if (!$definition->isPublic()) {
                $code .= '            '.$this->doExport($id)." => true,\n";
            }
        }

        if (empty($code)) {
            return '';
        }

        $out = "        \$this->privates = array(\n";
        $out .= $code;
        $out .= "        );\n";

        return $out;
    }
191427
public function storageProperty()
    {
        if ($this->storageProperty === null) {
            throw new RuntimeException(sprintf(
                'Storage property owner is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->storageProperty;
    }
759620
private function setProperties()
    {
        \danog\MadelineProto\Logger::log('Generating properties...', \danog\MadelineProto\Logger::NOTICE);
        $fixture = DocBlockFactory::createInstance();
        $class = new \ReflectionClass(APIFactory::class);
        $content = file_get_contents($filename = $class->getFileName());
        foreach ($class->getProperties() as $property) {
            if ($raw_docblock = $property->getDocComment()) {
                $docblock = $fixture->create($raw_docblock);
                if ($docblock->hasTag('internal')) {
                    $content = str_replace("\n    ".$raw_docblock."\n    public \$".$property->getName().';', '', $content);
                }
            }
        }
        foreach ($this->get_method_namespaces() as $namespace) {
            $content = preg_replace('/(class( \\w+[,]?){0,}\\n{\\n)/', '${1}'."    /**\n"."     * @internal this is a internal property generated by build_docs.php, don't change manually\n"."     *\n"."     * @var {$namespace}\n"."     */\n"."    public \${$namespace};\n", $content);
        }
        file_put_contents($filename, $content);
    }
782109
public function loadPrivateKey(PrivateKeyConfiguration $key) : PrivateKey
    {
        if ($key->isFile()) {
            $privateKey = File::getFileContents($key->getFilePath());
        } else {
            $privateKey = $key->getContents();
        }

        return PrivateKey::create($privateKey, $key->getPassPhrase());
    }
125530
protected static function define_properties() {
        return array(
            'userid' => array(
                'type' => PARAM_INT,
            ),
            'competencyid' => array(
                'type' => PARAM_INT,
            ),
            'proficiency' => array(
                'type' => PARAM_BOOL,
                'default' => null,
                'null' => NULL_ALLOWED,
            ),
            'grade' => array(
                'type' => PARAM_INT,
                'default' => null,
                'null' => NULL_ALLOWED,
            ),
            'planid' => array(
                'type' => PARAM_INT,
            ),
            'sortorder' => array(
                'type' => PARAM_INT,
                'default' => 0,
            ),
        );
    }
1251739
public function hideHeader()
    {
        $properties = $this->getProperties();
        $properties['header'] = false;
        $this->setProperties($properties);
        return $this;
    }
1234760
protected static function define_other_properties() {
        return [
            'id' => ['type' => PARAM_INT],
            'discussion' => [
                'type' => discussion::read_properties_definition(),
            ],
            'replies' => ['type' => PARAM_INT],
            'unread' => ['type' => PARAM_INT],
            'firstpostauthor' => [
                'type' => author::read_properties_definition(),
            ],
            'latestpostauthor' => [
                'type' => author::read_properties_definition(),
            ],
            'latestpostid' => ['type' => PARAM_INT],
        ];
    }
305499
public function GetPublicProperties()
	{
		$className = get_class($this);

		if (!array_key_exists($className, self::$PublicPropCache))
		{

			$props = array();
			$ro = new ReflectionObject($this);

			foreach ($ro->getProperties() as $rp )
			{
				$propname = $rp->getName();

				if (!in_array($propname,self::$NoCacheProperties))
				{
					if (!($rp->isPrivate() || $rp->isStatic()))
					{
						$props[] = $propname;
					}
				}
			}

			self::$PublicPropCache[$className] = $props;
		}

		return self::$PublicPropCache[$className];
	}
448135
private function getUnsettablePropertiesDeclaration()
    {

        // if unsettable properties are the default we don't need to do anything
        if( $this->unsetableProperties === array('id') ) {
            return array();
        }

        $unsetableProperties = array_map(
            function($property){
                return "'".addslashes($property)."'";
            }
            , $this->unsetableProperties
        );

        $this->class->classComponents[] = new VariableDeclaration(
            'unsetableProperties',
            new Sformatf( <<<'PHP'
                /**
                 * Unsetable properties
                 * @var array
                 */
                protected static $unsetableProperties = [%s];
PHP
                , implode( ', ', $unsetableProperties )
            )
        );

        return $this;

    }
211284
private function addServices()
    {
        $publicServices = $privateServices = '';
        $definitions = $this->container->getDefinitions();
        ksort($definitions);
        foreach ($definitions as $id => $definition) {
            if ($definition->isSynthetic() || ($this->asFiles && $definition->isShared() && !$this->isHotPath($definition))) {
                continue;
            }
            if ($definition->isPublic()) {
                $publicServices .= $this->addService($id, $definition);
            } else {
                $privateServices .= $this->addService($id, $definition);
            }
        }

        return $publicServices.$privateServices;
    }
1124813
private function handleInputPrivate()
    {
        $this->parseVerbosity();
        $this->parseFieldsProvided();
        $this->parseToken();
        $this->parseSourceId();
        $this->parseSource();
        $this->parseCampaignId();
        $this->validateToken();
        $this->parseSourceCampaignSettings();
        $this->parseCampaign();

        return $this;
    }
25506
function serialize()
	{
		$propvals = array();
		$ro = new ReflectionObject($this);

		foreach ($ro->getProperties() as $rp )
		{
			$propname = $rp->getName();

			if (!in_array($propname,self::$NoCacheProperties))
			{
				if (method_exists($rp,"setAccessible"))
				{
					$rp->setAccessible(true);
					$propvals[$propname] = $rp->getValue($this);
				}
				elseif (!$rp->isPrivate())
				{
					// if < php 5.3 we can't serialize private vars
					$propvals[$propname] = $rp->getValue($this);
				}

			}
		}

		return serialize($propvals);
	}
993985
public function getPrivateSharedKey() {
        return (string) $this->encryptor->decrypt($this->getValue(
            self::KEY_PRIVATE_SHARED_KEY,
            $this->storeManager->getStore()
        ));
    }
637324
public function addProperties($properties)
    {
        foreach ($properties as $key => $value) {
            $this->setProperty($key, $value);
        }

        return $this;
    }
733921
public function addRules()
    {
        $this->property->relatedPropertiesModel->addRule($this->property->code, 'number');

        if ($this->property->isRequired) {
            $this->property->relatedPropertiesModel->addRule($this->property->code, 'required');
        }

        return $this;
    }
1346157
function is_private()
    {
        $now = time();

        foreach ($this->subkeys as $subkey)
            if ($subkey->has_private)
                return true;

        return false;
    }
737282
protected static function define_properties() {
        return array(
            'userid' => array(
                'type' => PARAM_INT,
            ),
            'competencyid' => array(
                'type' => PARAM_INT,
            ),
            'status' => array(
                'choices' => array(
                    self::STATUS_IDLE,
                    self::STATUS_WAITING_FOR_REVIEW,
                    self::STATUS_IN_REVIEW,
                ),
                'type' => PARAM_INT,
                'default' => self::STATUS_IDLE,
            ),
            'reviewerid' => array(
                'type' => PARAM_INT,
                'default' => null,
                'null' => NULL_ALLOWED,
            ),
            'proficiency' => array(
                'type' => PARAM_BOOL,
                'default' => null,
                'null' => NULL_ALLOWED,
            ),
            'grade' => array(
                'type' => PARAM_INT,
                'default' => null,
                'null' => NULL_ALLOWED,
            ),
        );
    }