Get the project properties from the saved file

@return string
504038
private function getProjectProperties()
    {
        $r = '';

        $projectOptions = (array)$this->xml->xpath('/draggy/project');
        $projectOptions = (array)$projectOptions[0];

        $this->checkMandatoryAttributes('Project', $projectOptions, ['language', 'description', 'orm', 'framework']);

        $r .= 'Draggy.prototype.setLanguage(\'' . $projectOptions['language'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setDescription(\'' . str_replace('\'', '\\\'', $projectOptions['description']) . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setORM(\'' . $projectOptions['orm'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.setFramework(\'' . $projectOptions['framework'] . '\');' . PHP_EOL;
        $r .= 'Draggy.prototype.updateConfiguration();' . PHP_EOL;

        return $r;
    }
747702
function saveInlineProperties()
	{
		$saved = [];
		$saved['family'] = $this->FontFamily;
		$saved['style'] = $this->FontStyle;
		$saved['sizePt'] = $this->FontSizePt;
		$saved['size'] = $this->FontSize;
		$saved['HREF'] = $this->HREF;
		$saved['textvar'] = $this->textvar; // mPDF 5.7.1
		$saved['OTLtags'] = $this->OTLtags; // mPDF 5.7.1
		$saved['textshadow'] = $this->textshadow;
		$saved['linewidth'] = $this->LineWidth;
		$saved['drawcolor'] = $this->DrawColor;
		$saved['textparam'] = $this->textparam;
		$saved['lSpacingCSS'] = $this->lSpacingCSS;
		$saved['wSpacingCSS'] = $this->wSpacingCSS;
		$saved['I'] = $this->I;
		$saved['B'] = $this->B;
		$saved['colorarray'] = $this->colorarray;
		$saved['bgcolorarray'] = $this->spanbgcolorarray;
		$saved['border'] = $this->spanborddet;
		$saved['color'] = $this->TextColor;
		$saved['bgcolor'] = $this->FillColor;
		$saved['lang'] = $this->currentLang;
		$saved['fontLanguageOverride'] = $this->fontLanguageOverride; // mPDF 5.7.1
		$saved['display_off'] = $this->inlineDisplayOff;

		return $saved;
	}
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;
    }
1077682
public function getSystemProperties()
    {

        // load the configuration service
        $service = $this->newService(ConfigurationService::class);

        // load the system properties
        $systemProperties =  $service->getSystemProperties($this->getContainer()->getContainerNode());

        // append the application specific properties
        $systemProperties->add(SystemPropertyKeys::WEBAPP, $webappPath = $this->getWebappPath());
        $systemProperties->add(SystemPropertyKeys::WEBAPP_NAME, basename($webappPath));
        $systemProperties->add(SystemPropertyKeys::WEBAPP_DATA, $this->getDataDir());
        $systemProperties->add(SystemPropertyKeys::WEBAPP_CACHE, $this->getCacheDir());
        $systemProperties->add(SystemPropertyKeys::WEBAPP_SESSION, $this->getSessionDir());

        // return the system properties
        return $systemProperties;
    }
1229880
private function getProjectInfo(){
		$pjInfo = array();

		$allData = $this->px2query(
			$this->page_path.'?PX=px2dthelper.get.all',
			array(
				"output" => "json"
			)
		);

		$pjInfo['conf'] = $allData->config;
		$pjInfo['pageInfo'] = $allData->page_info;
		$pjInfo['contRoot'] = $allData->path_controot;
		$pjInfo['documentRoot'] = $allData->realpath_docroot;
		$pjInfo['realpathFiles'] = $allData->realpath_files;
		$pjInfo['pathFiles'] = $allData->path_files;
		$pjInfo['realpathThemeCollectionDir'] = $allData->realpath_theme_collection_dir;
		$pjInfo['realpathDataDir'] = $allData->realpath_data_dir;
		$pjInfo['pathResourceDir'] = $allData->path_resource_dir;
		$pjInfo['realpath_homedir'] = $allData->realpath_homedir;

		// var_dump($pjInfo);
		return $pjInfo;
	}
1132872
public function structProperties()
    {
        $property = $this->storageProperty();

        if ($property) {
            $struct = $property->structureMetadata();

            if (isset($struct['properties'])) {
                return $struct['properties'];
            }
        }

        return [];
    }
1346086
protected function getClassProperties()
    {
        $properties = parent::getClassProperties();
        unset($properties[taoItems_models_classes_ItemsService::PROPERTY_ITEM_MODEL]);
        unset($properties[taoItems_models_classes_ItemsService::PROPERTY_ITEM_CONTENT]);
        unset($properties[taoItems_models_classes_ItemsService::PROPERTY_ITEM_CONTENT_SRC]);
        return $properties;
    }
137991
public function getProjectPaths() {
		$paths = array();
		if(!file_exists($this->getEnvironmentDir())) {
			throw new Exception('The environment directory '.$this->getEnvironmentDir().' doesn\'t exist. Create it first and add some projects to it.');
		}
		foreach(scandir($this->getEnvironmentDir()) as $project) {
			// Exlcude dot-prefixed directories (.git was getting in the way)
			if(preg_match('/^[^\.]/', $project)) {
				$path = $this->getEnvironmentDir().'/'.$project;
				if(is_dir($path) && $project!='.' && $project!='..') {
					$paths[] = $project;
				}
			}
		}
		sort($paths);
		return array_values($paths);
	}
654301
protected function _gen_getProperties()
    {
        _gen_getProperties_1:

        if ($this->_c__properties !== null) {
            foreach ($this->_c__properties as $name => $property)
                // yield $name => $property;

            return;
        }

        // ..

        $props   = array();

        $ref     = $this->_newReflection();
        $methods = $ref->getMethods(ReflectionMethod::IS_PUBLIC);
        foreach($methods as $method) {
            foreach(array('set', 'get', 'is') as $prefix) {
                if (strpos($method->getName(), $prefix) === 0) {
                    if (in_array($method->getName(), $this->doWhichMethodIgnored()))
                        ## it will use as internal option method
                        continue;

                    ## getAttributeName -> AttributeName
                    $propertyName = substr($method->getName(), strlen($prefix));
                    $propertyName = $this->_normalize($propertyName, 'external');

                    ## preserve previous stat for readable or writable
                    if (array_key_exists($propertyName, $props))
                        $property = $props[$propertyName];
                    else
                        $property = new PropObject($propertyName);

                    ## mark readable/writable for property
                    ($prefix == 'set')
                        ? $property->setWritable()
                        : $property->setReadable()
                    ;

                    $props[$propertyName] = $property;
                }
            }
        }

        $this->_c__properties = $props;
        goto _gen_getProperties_1;
    }
923561
public function actionDataProperties()
    {
        $data = [];
        foreach (Property::find()->all() as $item) {
            $object = Property::getObject($item->class_name);
            $data[] = [
                'id' => $item->id,
                'var_name' => $object->varName(),
                'option_json' => $object->options(),
                'label' => $object->label(),
                'type' => $object->type(),
                'default_value' => $object->defaultValue(),
                'i18n' => $object->i18n,
            ];
        }
        
        return $data;
    }
1355037
public function properties()
    {
        return array(
            'nb' => $this->archive->numFiles,
            'comment' =>
                (($comment = $this->archive->getArchiveComment() !== false)
                    ? $comment : null),
            'status' => 'OK',
        );
    }
230180
public static function getProperties()
    {
        return [
            'AttachmentID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
            'FileName' => [true, self::PROPERTY_TYPE_STRING, null, false, false],
            'Url' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
            'MimeType' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
            'ContentLength' => [false, self::PROPERTY_TYPE_INT, null, false, false],
        ];
    }
433810
public function getComputedProperties()
    {
        $result = array();

        if($entity = $this->getIterator()->current()) {
            $result = $entity->getComputedProperties();
        }

        return $result;
    }
991741
public function getProperties()
    {
        $names = array_keys($this->getValue('properties'));
        $result = [];
        foreach ($names as $name) {
            $result[$name] = $this->get($name);
        }

        return $result;
    }
1168452
public function getPropertiesPath()
    {
        $fileName = $this->path . DIRECTORY_SEPARATOR . '.properties';
        if(file_exists($fileName))
        {
            return $fileName;
        }
        $fileName = $this->path . DIRECTORY_SEPARATOR . '_properties';
        if(file_exists($fileName))
        {
            return $fileName;
        }

        return false;
    }
980992
function properties()
  {

    // ----- Reset the error handler
    $this->privErrorReset();

    // ----- Magic quotes trick
    $this->privDisableMagicQuotes();

    // ----- Check archive
    if (!$this->privCheckFormat()) {
      $this->privSwapBackMagicQuotes();
      return(0);
    }

    // ----- Default properties
    $v_prop = array();
    $v_prop['comment'] = '';
    $v_prop['nb'] = 0;
    $v_prop['status'] = 'not_exist';

    // ----- Look if file exists
    if (@is_file($this->zipname))
    {
      // ----- Open the zip file
      if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
      {
        $this->privSwapBackMagicQuotes();
        
        // ----- Error log
        PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');

        // ----- Return
        return 0;
      }

      // ----- Read the central directory informations
      $v_central_dir = array();
      if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
      {
        $this->privSwapBackMagicQuotes();
        return 0;
      }

      // ----- Close the zip file
      $this->privCloseFd();

      // ----- Set the user attributes
      $v_prop['comment'] = $v_central_dir['comment'];
      $v_prop['nb'] = $v_central_dir['entries'];
      $v_prop['status'] = 'ok';
    }

    // ----- Magic quotes trick
    $this->privSwapBackMagicQuotes();

    // ----- Return
    return $v_prop;
  }
1340892
public function getArrayCopy()
	{
		return array(
			'ProjectId' => $this->projectId,
			'Name' => $this->name,
			'Description' => $this->description,
			'Created' => $this->created,
			// *Extra* properties
			'CreatedFormatted' => $this->getCreatedFormatted()
		);
	}