forked from ezsystems/ezie
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: File has mixed line endings; this may cause incorrect results CR…
…LF => LF
- Loading branch information
Showing
1 changed file
with
52 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
<?php | ||
/** | ||
* File containing the eZIEImageAnalyzer class | ||
* This class overrides ezcImageAnalyzer in order to support the ezpublish cluster constraints | ||
* | ||
<?php | ||
/** | ||
* File containing the eZIEImageAnalyzer class | ||
* This class overrides ezcImageAnalyzer in order to support the ezpublish cluster constraints | ||
* | ||
* @copyright Copyright (C) eZ Systems AS. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
* @version //autogentag// | ||
* @package ezie | ||
*/ | ||
class eZIEImageAnalyzer extends ezcImageAnalyzer | ||
{ | ||
protected $deleteLocal = true; | ||
|
||
/** | ||
* Constructor overload | ||
* Creates a local copy of the image so that it can be analyzed | ||
* | ||
* @param string $file | ||
*/ | ||
public function __construct( $file, $deleteLocal = true ) | ||
{ | ||
$clusterHandler = eZClusterFileHandler::instance( $file ); | ||
$clusterHandler->fetch(); | ||
|
||
parent::__construct( $file ); | ||
|
||
$this->deleteLocal = $deleteLocal; | ||
if( $this->deleteLocal ) | ||
{ | ||
$clusterHandler->deleteLocal(); | ||
} | ||
} | ||
|
||
/** | ||
* Overload of ezcImageAnalyzer::analyzeImage() | ||
* Creates a temporary local copy of the image file so that it can be analyzed | ||
* | ||
* @return void | ||
*/ | ||
public function analyzeImage() | ||
{ | ||
$clusterHandler = eZClusterFileHandler::instance( $this->filePath ); | ||
$clusterHandler->fetch(); | ||
|
||
parent::analyzeImage(); | ||
|
||
if( $this->deleteLocal ) | ||
{ | ||
$clusterHandler->deleteLocal(); | ||
} | ||
} | ||
} | ||
|
||
* @version //autogentag// | ||
* @package ezie | ||
*/ | ||
class eZIEImageAnalyzer extends ezcImageAnalyzer | ||
{ | ||
protected $deleteLocal = true; | ||
|
||
/** | ||
* Constructor overload | ||
* Creates a local copy of the image so that it can be analyzed | ||
* | ||
* @param string $file | ||
*/ | ||
public function __construct( $file, $deleteLocal = true ) | ||
{ | ||
$clusterHandler = eZClusterFileHandler::instance( $file ); | ||
$clusterHandler->fetch(); | ||
|
||
parent::__construct( $file ); | ||
|
||
$this->deleteLocal = $deleteLocal; | ||
if( $this->deleteLocal ) | ||
{ | ||
$clusterHandler->deleteLocal(); | ||
} | ||
} | ||
|
||
/** | ||
* Overload of ezcImageAnalyzer::analyzeImage() | ||
* Creates a temporary local copy of the image file so that it can be analyzed | ||
* | ||
* @return void | ||
*/ | ||
public function analyzeImage() | ||
{ | ||
$clusterHandler = eZClusterFileHandler::instance( $this->filePath ); | ||
$clusterHandler->fetch(); | ||
|
||
parent::analyzeImage(); | ||
|
||
if( $this->deleteLocal ) | ||
{ | ||
$clusterHandler->deleteLocal(); | ||
} | ||
} | ||
} | ||
|
||
?> |