src/Loaders/SourceAndTargetDirLoader.php
/**
     * Loads and returns data.
     *
     * @return \ArrayAccess The array with the data
     */
Loads and returns data.
@return \ArrayAccess The array with the data
Loads and returns data . @return \ ArrayAccess The array with the data
public function load()
    {
        $directories = array();
        $status = $this->getRegistryProcessor()->getAttribute(RegistryKeys::STATUS);
        if (is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) {
            $directories[] = $sourceDir;
        }
        if (is_dir($targetDir = $status[RegistryKeys::TARGET_DIRECTORY])) {
            if (in_array($targetDir, $directories) === false) {
                $directories[] = $targetDir;
            }
        }
        return $directories;
    }
public function load ( ) { $ directories = array ( ) ; $ status = $ this -> getRegistryProcessor ( ) -> getAttribute ( RegistryKeys :: STATUS ) ; if ( is_dir ( $ sourceDir = $ status [ RegistryKeys :: SOURCE_DIRECTORY ] ) ) { $ directories [ ] = $ sourceDir ; } if ( is_dir ( $ targetDir = $ status [ RegistryKeys :: TARGET_DIRECTORY ] ) ) { if ( in_array ( $ targetDir , $ directories ) === false ) { $ directories [ ] = $ targetDir ; } } return $ directories ; }
Loads and returns data.
Loads and returns data .
// initialize the array for the directories that has to be cleared // load the actual status // query whether or not the configured source directory is available // query whether or not the configured target directory is available // query whether or not the directory has already been added // return the directories to be cleared