Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-19411

Avoid file_exists and include calls for registering datatypes and workflows

    XMLWordPrintable

Details

    Description

      hello. with the help of Gaetano i've made of changes in order to avoid the need of file_exists and include calls for registering datatypes. i will try to go in a similar way for workflows but i would like to know your opinion and comments.

      Changes has been pushed to https://github.com/crevillo/ezpublish/tree/avoid-fileexists-include-calls-for-registering-datatypes-workflows

      Basically there's a new way of define datatypes. Key/val instead of only val.

      for registering the datatype, function get the availabledatatypes from the ini files. if datatype string exists as a key of the availableDataTypes array, then class existence is checked, and if true, just return and exit from the function.

      if the datatype is still defined in the way we use to do, it will do the loop and datatype will be loaded without any problems. this is for respecting backward compatibility.

      As you may see, there's no need to call eZDataType::register in every datatype either.

      Feel free to comment if you find something wrong here.

      Attachments

        Activity

          People

            Unassigned Unassigned
            desorden desorden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: