Split all files mith multiple classes into multiple files
This commit is contained in:
40
src/GraphPalette.php
Normal file
40
src/GraphPalette.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/** DomFramework
|
||||
* @package domframework
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
* @license BSD
|
||||
*/
|
||||
|
||||
namespace Domframework;
|
||||
|
||||
/** The graphPalette class */
|
||||
class GraphPalette
|
||||
{
|
||||
/** Get the complete palette
|
||||
* @param string $name The palette name to get
|
||||
*/
|
||||
public static function getPalette($name)
|
||||
{
|
||||
$palette = array(
|
||||
"basic" => array(
|
||||
array("bgcolor" => "indianred", "color" => "firebrick"),
|
||||
array("bgcolor" => "lightblue", "color" => "blue"),
|
||||
array("bgcolor" => "peru", "color" => "maroon"),
|
||||
array("bgcolor" => "mediumaquamarine", "color" => "teal"),
|
||||
array("bgcolor" => "orange", "color" => "goldenrod"),
|
||||
array("bgcolor" => "limegreen", "color" => "green"),
|
||||
array("bgcolor" => "darkgrey", "color" => "grey"),
|
||||
array("bgcolor" => "darkyellow1", "color" => "darkyellow2"),
|
||||
array("bgcolor" => "grey", "color" => "black"),
|
||||
),
|
||||
);
|
||||
if (! is_string($name) || ! array_key_exists($name, $palette)) {
|
||||
throw new \Exception(dgettext(
|
||||
"domframework",
|
||||
"Unknown palette name provided"
|
||||
), 406);
|
||||
}
|
||||
return $palette[$name];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user