$date = DateTime::createFromFormat($format, $Stroke, new DateTimeZone('Europe/Moscow'));
if( !in_array( $type, ['voice', 'balance1', 'balance2', ...] ) ) die("Wrong type");
if( !in_array( $action, ['set', 'get', 'add'] ) ) die("Wrong action");
if($type == 'balance1' || $type == 'voice' || $type == 'voice2' || $type == 'balance2')
if( in_array( $type, ['balance1', 'voice', 'voice2', 'balance2') )
ава была размером 500x500 или какая-то кнопка 2000х2000. Ну или если ограничить размеры элемента, то получатся безумные пробелы
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
/**
* @Gedmo\Tree(type="nested")
* @ORM\Table(name="Tree")
* @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository")
*/
class Tree
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @Gedmo\TreeLeft
* @ORM\Column(name="lft", type="integer")
*/
private $lft;
/**
* @Gedmo\TreeLevel
* @ORM\Column(name="lvl", type="integer")
*/
private $lvl;
/**
* @Gedmo\TreeRight
* @ORM\Column(name="rgt", type="integer")
*/
private $rgt;
/**
* @Gedmo\TreeRoot
* @ORM\Column(name="root", type="integer", nullable=true)
*/
private $root;
/**
* @Gedmo\TreeParent
* @ORM\ManyToOne(targetEntity="Category", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $parent;
/**
* @ORM\OneToMany(targetEntity="Category", mappedBy="parent")
* @ORM\OrderBy({"lft" = "ASC"})
*/
private $children;
}
$img_info = pathinfo( $_FILES["filename"]["name"] );
$ext = $img_info["extension"];
new Date().toLocaleString('ru', {
year: 'numeric',
month: 'long',
day: 'numeric'
});
glob('name-[0-9]+.{jpg,gif,png}', GLOB_BRACE);